Hi. Assume I have one ~/.Rprofile (in my home directory) and one ./.Rprofile (in my current working directory). In this case, the latter will have higher priority and will be the script that R uses during the startup process.
Is there a *generic* way to programmatically from within ./.Rprofile and ~/.Rprofile to tell what their absolute pathnames are or equivalently what directories they are located in? Conceptually something like: path <- directoryOfRprofile() message("Running ", file.path(path, ".Rprofile")) message(".Rprofile is in the home directory: ", normalizePath(path) == normalizePath("~")) I don't want to / cannot manually set the `path` variable. Since .Rprofile is sourced very early on when R starts up (e.g. sys.calls() is NULL), I suspect the answer to my question is no, but maybe someone else can prove me wrong. Thanks, Henrik ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel