The dirname() function looks very helpful; I hadn't heard of that one before.

I'm still reading up to see how the parent.frame command does what it does;
I didn't realize that the ofile variable might not be around in the future.  

Richard's suggestion -- source("c:/myfullpath/myfile.r", chdir=TRUE) -- is
probably the best; I would still have to update "myfullpath" if I move
myfile.r, but that's not hard to do.

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Looking-up-the-directory-a-file-is-located-in-tp3047649p3049394.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to