A colleague sent me the following information on moving SPSS files to R:
Stat/Transfer doesn’t do this. For you non-R users, here’s how they can do it on their computer (since we don’t have R):
Open R. Under “File” pulldown menu, “Change Dir” to where the data is…
require(foreign)
mydata <- read.spss("bogus.sav",use.value.labels = TRUE, to.data.frame = TRUE)
You want to move to the directory where your data is after you open R, because R doesn’t seem to like paths in the file name.
“require(foreign)” loads a library of functions for reading data
read.dta and read.sas are similar functions for Stata and SAS. R also has a bunch of functions to read ASCII data:
read.cvs read.table read.delim
Somewhat confusingly, paths in R have to be specified using / rather than the backslash. For instance:
read.spss("E:/work/bogus.sav")
To set the work directory:
setwd("E:/work")