Define the file path from the file name in R
问题 I know that I can find file name from full file path in R, but is there a way to define the path to the file just from the file name? Think about such scenario: you store the data file in the cloud (e.g. Dropbox) so the path for this file is slightly different at your home: read.table("path/user1/data.dat") and work: read.table("path/user2/data.dat") . Therefore, every time you want to read.table() you have to change one element of the path to match either you work or home path (on Mac OS X