You could simply create your own function, to avoid repeating the
paste part each time:
scriptdir - path.to.scripts
my.source - function(file) {
source(file.path(scriptdir,file))
}
my.source(file.r)
my.source(anotherfile.r)
...
(You'll have to watch out for correct number of slashes
consider something along the lines of:
scriptdir - '/path/to/scripts/
source(paste(scriptdir,'subscript.r',sep=''))
alternatively, you could try:
workdir - getwd()
scriptdir - '/path/to/scripts/
setwd(scriptdir)
source('subscript.r')
setwd(workdir)
cheers,
tim
On 10/26/07, Bryan Hanson
2 matches
Mail list logo