Is there such a function (like sas.get for S ...) to be able to convert a SAS dataset (PC one .sd2) to a dataframe or matrix in R? thanks -- Didier G. Leibovici didier at fmrib.ox.ac.uk +44 (0)1865 222 739 Image Analysis Group fax:+44 (0)1865 222 717 Oxford University, Centre For Functional Magnetic Resonance Imaging of the Brain (FMRIB), John Radcliffe Hospital, Headington, Oxford OX3 9DU, U.K http://www.fmrib.ox.ac.uk/~didier/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Didier Leibovici <didier at fmrib.ox.ac.uk> writes:> Is there such a function (like sas.get for S ...) > to be able to convert a SAS dataset (PC one .sd2) > to a dataframe or matrix in R?There is a package called "foreign" in the src/contrib/Devel section of CRAN that can read data sets in the SAS XPORT format. I don't know of functions to read the SAS .sd2 format. If you do convert the data set to the XPORT format and read it with functions in the foreign package, be careful to check the last row. Determining exactly what is the last row in a SAS data set is not easy and those functions may get it wrong. That is why the package is in the Devel section. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._