I've been trying to import data into R using a .dat and .sps files. The .dat file has no headers and varying lengths of columns which are of course included in the .sps file. It also contains missing values. I've tried using spss.fixed.file
from package memisc but when I specify it as:
x=spss.fixed.file(file=data.dat,columns.file=input.sps,varlab.file=input.sps)
and I get the following error:
Error in spss.parse.variable.labels(varlab.file) : too many 'variable label' statments
Has anyone used this command/package before? I can't understand whether it's ok for both the columns.file and the varla.file to be the same file, given all that information is included in the same .sps file. Any help would be very much appreciated!
来源:https://stackoverflow.com/questions/11652502/input-data-into-r-from-dat-and-sps-files