Skip to content
Prev 22371 / 398502 Next

filename of source file

Yes, source refers to the use of the source() function. Suppose I invoke 
a file like so:

source("/path/name/filename.r")

I want to insert a command in filename.r like so:

fullpath <- magic_command()

such that fullpath is now "/path/name/filename.r"

In other words, I want filename.r to be able to figure out where it is, 
regardless of where I put it, so that it can save all its output in the 
same directory.

dave r
On Sunday, August 4, 2002, at 10:09 PM, Andrew C. Ward wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._