Re: [R] How to read and write an S4 class

2009-08-12 Thread ml-r-help
see ?dput ?save e.g. setClass("track", representation(x="numeric", y="numeric")) x <- new("track", x=1:4, y=5:8) # save as binary fn <- tempfile() save(x, ascii=FALSE, file=fn) rm(x) load(fn) x # save as ASCII save(x, ascii=TRUE, file=fn) # ASCII text representation from which to regenerate

[R] How to read and write an S4 class

2009-08-11 Thread R_help Help
Hi, I have an object in S4 class. Is there anyway that I can write to a file and read it back to R? Thank you. adschai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proje