[R] Dumping functions to RCS
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Apr 28 16:29:14 CEST 2000
"F.Tusell":
>
> To keep track of an ongoing programming project, I would like to dump
> all my functions to individual ASCII files named xxx.R, yyy.R, etc.
> Presently I do so manually in order to use RCS (on a Linux machine),
> so I can keep track of all versions, differences, snapshots, etc.
>
> Is there any easy way to dump all functions in the workspace to
> individually named files? Thank you very much for any ideas.
This should work:
my.funs <- names((x <- sapply(ls(),
function(y){is.function(get(y))}))[x==TRUE])
for(i in 1:length(all.funs))
dump(list=(temp <- my.funs[i]), fileout=paste(temp, ".R"))
(in .....fileout=paste(.)....) you could specify the path additionally)
Regards,
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list