subura said the following on 10/15/2007 12:04 PM: > Care to explain how i can use a wildcard expression to "source" all files > ending with .R in a subdirectory ? I've tried something like this > 'source(glob2rx("*.R"))' without success. > > Thank you
Try R.files <- list.files(my.path, pattern = glob2rx("*.R"), full = TRUE) invisible(sapply(R.files, source)) HTH, --sundar ______________________________________________ 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.