[R] filename of source file

Jim Lemon bitwrit at ozemail.com.au
Mon Aug 5 13:27:09 CEST 2002


David Richmond wrote:
> 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"
>

How about

source(fullpath<-"/path/name/filename.r") ?

Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list