Re: [R] how to organize a lot of R source files

2010-01-09 Thread Hao Cen
Hi Henrik, Thanks for your suggestion. I created a directory with 10 R files and tried the following and measured its time system.time(sourceDirectory(~/fun, modifiedOnly = F)) system.time(sourceDirectory(~/fun, modifiedOnly = T)) But the second line seems to spend as much time as the first

Re: [R] how to organize a lot of R source files

2010-01-09 Thread Henrik Bengtsson
Hi. On Sat, Jan 9, 2010 at 6:16 PM, Hao Cen h...@andrew.cmu.edu wrote: Hi Henrik, Thanks for your suggestion. I created a directory with 10 R files and tried the following and measured its time system.time(sourceDirectory(~/fun, modifiedOnly = F)) system.time(sourceDirectory(~/fun,

[R] how to organize a lot of R source files

2010-01-08 Thread Hao Cen
Hi, I wonder what is a better way to organize a lot of R source files. I have a lot of utility functions written and store them in several source files (e.g util1.R, util2.R,..utilN.R). I also have a master file in which the source command is used to load all the util.R files. When I need to use

Re: [R] how to organize a lot of R source files

2010-01-08 Thread Jim Lemon
Hi Jeff, Your request makes a lot of sense. I often modify files in the packages I maintain, typically by loading the package, then working on a copy of the function, continually sourcing the new code until it works correctly, and then checking and building the package. Apart from the

Re: [R] how to organize a lot of R source files

2010-01-08 Thread Henrik Bengtsson
library(R.utils); sourceDirectory(myRFiles/, modifiedOnly=TRUE); See ?sourceDirectory (regardless what the Rd help say, any '...' argument is passed to sourceTo()). /Henrik On Fri, Jan 8, 2010 at 7:38 AM, Hao Cen h...@andrew.cmu.edu wrote: Hi, I wonder what is a better way to organize a lot