[Rd] foreign(read.spss) in rw2000 and re2001beta
tlumley at u.washington.edu
Sat Nov 6 20:14:55 CET 2004
On Sat, 6 Nov 2004, Peter Dalgaard wrote:
> Thomas Lumley <tlumley at u.washington.edu> writes:
>> I have modified read.spss (but not committed the changes yet) so that
>> it does not create a factor when there are missing levels.
> Hmm, could we handle this more elegantly? At the very least, we should
> probably try to keep the labels as an attribute, so that you have the
> option of doing something constructive with them afterwards.
They are kept as an attribute if use.value.labels=TRUE, whether or not a
factor is created. I had thought they were always kept as an attribute
even if use.value.labels=FALSE (as happens with read.dta), but this turns
out not to be the case. This is easily fixed, and I will do so.
I have thought about a class that would make sense for data with some
values labelled but not all. This is related to some other data
representation issues that a colleague is asking about, and we may come up
with a reasonably elegant and general solution.
More information about the R-devel