Skip to content
Prev 11652 / 398502 Next

spss-data import

On Sat, Jun 09, 2001 at 03:57:29PM +0200, Bernd Weiss wrote:
Look at your exported data-file an you'll see how you have to read
it. My standard way to read excel csv files is:

Akten1998.1 <- read.csv("File.csv",sep=";",as.is=T,dec=",")

But this depends on several cirumstances. E.g. on some windows
platforms the "dec" is set to "." (I think you can set this with spss). 

Spss often uses tabs as seperators (depends how you export your file 
in spss) so 

sep="\t"

should work.

My experience with read.spss:

1. Works often with spss version 6-9...
2. ...mut sometimes crash with these files (I have at least one file
that is not readable).
3. Don't work with spss version 10 files. Even spss 6 cannot read
them. 

So: 
while (!success)
	exoport from spss with other options
	look at the file
	specify read.xxx parameter

Peter