|
|
|
|
|
by roel_v
3119 days ago
|
|
I complain about this every time a post on R programming comes up here, but my favorite thing to hate (our of many) about R is that there's no way to find out what the directory of the current script is. Imagine someone would want to use relative paths to their data files so that they could version control their scripts and run them unmodified on different machines! We wouldn't want to enable such abominations now would we! |
|
The current working directory can be found with getwd() and set with setwd().
If you set the working directory at the beginning of the script, paths to data files should be relative to that location.