[R] SPSS and R ? do they like each other?

Chuck Cleland ccleland at optonline.net
Wed Jan 11 17:09:13 CET 2006


Michael Reinecke wrote:
> ... and is there also such a nice tool (like spss.get) for exporting
> data frames to SPSS? write.table does not keep the data frame labels -
> neither did the other exporting tools that I found.
> ... 

library(foreign)
?write.foreign

write.foreign(df, datafile, codefile, package = "SPSS")

   The codefile generated is SPSS syntax which will read the datafile 
and create SPSS variable and value labels.

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list