Quick thought for newbies to R. I have spent four years loading in data like this
on my Windows machine and like this
on my Linux machine. I would comment out the one I wasn’t using at the time.
It’s fine for a while but once you start reading multiple dataframes (particularly if they’re not all loaded at the start) it gets very fiddly and annoying. Don’t do this. Just set your working directory. You can do it manually:
Or, even better, the seamless option:
setwd(ifelse(Sys.info()['sysname']=="Windows";, "D:\Dropbox\R-files\Project1\", "~/Dropbox/R-files/Project1/"))
Mmm, I can almost taste the hours I’ll save in the course of a year.