Dear everybody: We used the fine foreign library to bring in an SPSS dataset that was about 9 megabytes and I can squeeze it into a much smaller R object using compression with save(ndat, file="NatAnnES2000.rda", compress=T). I can use load() to get the "ndat" dataframe back, that's all good as far as I can see. If I put that file in the data subdirectory, then the data() command finds it and I can load it. Seems fine, but then I started wondering if there is not some more sophisticated way of packaging these things. For example, how do people put in the meta information that appears in the right side of the data() output, as in: Data sets in package '.': NatAnnES2000 Data sets in package 'base': Formaldehyde Determination of Formaldehyde HairEyeColor Hair and Eye Color of Statistics Students ... Are there other attributes that I should specify if I want to package an .rda file for other users? An rda file created in this way will translate across platforms, won't it? pj -- Paul E. Johnson email: pauljohn at ku.edu Dept. of Political Science http://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
Paul Johnson wrote: ...> We used the fine foreign library to bring in an SPSS dataset that was > about 9 megabytes and I can squeeze it into a much smaller R object > using compression with > > save(ndat, file="NatAnnES2000.rda", compress=T)....> how do people > put in the meta information that appears in the right side of the data() > output, as in: > > Data sets in package '.': > > NatAnnES2000 > Data sets in package 'base': > > Formaldehyde Determination of Formaldehyde > HairEyeColor Hair and Eye Color of Statistics Students > ...The meta information is from the documentation, such as help(Formaldehyde). prompt(NatAnnES2000) will create a template .Rd file in R's working directory for the data frame (their doc standards are slightly different to functions). Fill in the blanks, and copy to the man/ subdirectory of your package.> Are there other attributes that I should specify if I want to package an > .rda file for other users?Just documenting it works for me. Rcmd CHECK or R CMD CHECK will grumble if there's something you've forgotten to document.> An rda file created in this way will translate across platforms, won't it?Not sure about the compression; otherwise, yes. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz