Re: [Rd] foreign(read.spss) in rw2000 and re2001beta

From: Thomas Lumley <>
Date: Sun 07 Nov 2004 - 06:14:55 EST

On Sat, 6 Nov 2004, Peter Dalgaard wrote:

> Thomas Lumley <> 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.

         -thomas mailing list Received on Sun Nov 07 06:23:00 2004

This archive was generated by hypermail 2.1.8 : Sun 07 Nov 2004 - 07:09:25 EST