Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

How to export a dataset to SPSS?

$
0
0

I want to export a dataset in the MASS package to SPSS for further investigation. I'm looking for the EuStockMarkets data set in the package.

As described in http://www.statmethods.net/input/exportingdata.html, I did:

library(foreign)
write.foreign(EuStockMarkets, "c:/mydata.txt", "c:/mydata.sps",   package="SPSS")

I got a text file but the sps file is not a valid SPSS file. I'm really looking for a way to export the dataset to something that a SPSS can open.


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>