Skip to content
Prev 11190 / 398502 Next

Managing R objects with 'make'

On Fri, 11 May 2001, Taylor, Z Todd wrote:

            
You *can* store individual objects or sets of objects in files in R, it
just doesn't happen automatically. If your object creation is done by
scripts it is easy to build in a save() command

Eg  build_data.r

x<-read.table("xfile.dat")
y<-read.table("yfile.dat")
z<-somefunctionof(x,y)
save(x,y,z,file="xyz.rdata")


   mkchart.R

load("xyz.rdata")
postscript("chart.ps")
plot(someobjectbasedon(x,y,z))
dev.off()


	-thomas


Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._