I want to import both values and labels from a dataset but I don't understand how to do it with this package (the documentation is not clear). I know it is possible because Rz (a gui interface for R) uses memisc to do this. I prefer, though, not to depend on too many packages.
Here the only piece of code I have:
dataset <- spss.system.file("file.sav")
I figured out a solution to this that I like
See the example in
?importer()
which coversspss.system.file()
.spss.system.file
creates an 'importer' object that can show you variable names.To actually use the data, you need to either do:
You end up with a data.set object which is quite complex, but does have what you want. For analysis, you usually need to do:
as.data.frame
on dataset2.