[R] Export Created Variables to SPSS/.csv

Michael Bibo michael_bibo at health.qld.gov.au
Tue Mar 27 09:23:47 CEST 2012


Strassburger, Daniel <Daniel_Strassburger <at> baylor.edu> writes:

> 
> I haven't been successful in converting my colleagues to the world of R yet
they wish to share collected data
> so that they may analyze it in SPSS.
> 
> I know how to write to an SPSS file and it opens fine, but my problem is that
it only includes the existing data -
> none of the variables I created within R.

Daniel,

 Apologies if this is too obvious, but have you appended the new variables that
you have created in R to the original dataset before you export in SPSS or .csv
format?  This doesn't happen automatically in R.

Somthing like:

all.data <- data.frame (imported.data, created.variable1, created.variable2, etc)



Michael Bibo
Queensland Health



More information about the R-help mailing list