[R-sig-Geo] Determine the location of the actual R-file

Breitbach, Nils breitbach at uni-mainz.de
Fri Oct 2 09:44:15 CEST 2009


Dear community,

this time my question has something to do with with spatial context but not in the sense we discuss it usually here. I tried to find out if it is possible to ask R for the location (path) of the R-file from which I send the code. What I want to ensure is, that the R code works, no matter where I move the folder with all the necesssary files to. There are some ways to code the location relative to an environment variable (like R.home) but I need the location independent of the directory where R is installed since this is not equal on every users' maschine.

Is there a way to ask R for the path of the r-file from which the line is sent?

I hope that you have some ideas for me ...
Cheers,

Nils


More information about the R-sig-Geo mailing list