On Sat, 6 Nov 2004, Peter Dalgaard wrote:
Kjetil Brinchmann Halvorsen <[EMAIL PROTECTED]> writes:
I made a test file test.sav with SPSS version 11.5.1 containing only one numeric variable, with a value label for one value not occuring in the file. According to ?read.spss this should result in a factor, but it results in all NA.
It should result in a factor all of whose values are missing. And it does.
I have modified read.spss (but not committed the changes yet) so that it does not create a factor when there are missing levels.
The problem is that SPSS uses value labels for two different things: for factors and for labelling a subset of values (eg different types of missing). It is hard for R to guess which the user intends.
You can always set use.value.labels=FALSE. You still get the value labels read in and then you can decide what to do with them.
-thomas
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel