On Sun, 11 Jul 2004, Gabor Grothendieck wrote: > search.path <- > function(fn, > paths = strsplit(Sys.getenv("PATH"), split = ";")[[1]], > fsep = "\\") { > for(d in paths) { > f <- file.path(d, fn, fsep = fsep) > if (file.exists(f)) > return(f) > } > return(NULL) > } > > source(search.path("myscript.R"))
I glanced this and thought this might be handy to keep for possible use. To make it less Windows-specific, I was going to replace Gabor's fsep default value with '.Platform$file.sep' when I noticed that .Platform doesn't have a '$path.sep' field. Just missing or available elsewhere? ---------------------------------------------------------- SIGSIG -- signature too long (core dumped) ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html