[R] New version of read.spss requires scripts to be re-written

Thomas Lumley tlumley at u.washington.edu
Wed Mar 13 18:12:15 CET 2002

On Wed, 13 Mar 2002, Stuart Leask wrote:

> Hi there. I'm delighted to see that the latest version of read.spss imports
> categorical value labels, but in doing so causes trouble if most of the
> values of a variable are continuous measures (eg. weight in kg), and just a
> few are categorical (eg. -3 not measured -2 not applicable etc.), as we've
> been warned.
> Effectively the default function is now different. Old scripts that worked
> now need editing.

You could also edit the foreign package and change the default

> I suppose that the lack of value label handling in the old read.spss was a
> bug, so any improvements should be the default. However, the current
> function 'doesn't work any more'.
> (It may again when read.spss' handling of this sort of variable is further
> upgraded)
> Is there any agreement as to whether updated functions should be
> backwards-compatible by default?

Yes, though the situation is less clear for packages that aren't part of
base R.  For a base package the 1.4.1 release should be backward
compatible with 1.4.0, but recommended packages don't necessarily have a
synchronised release schedule [the ones that depend on S code from other
people can't, for example].

The next version, which will appear with 1.5.0, has an option to use
values labels only when there are fewer than some specified number of
unique values.

While I'm not sure that you can always rely on compatibility with
recommended packages, and you could argue that this was a bug fix, in this
case it really was a mistake -- I had forgotten the possibility of a few
value labels on a continuous variable since none of the SPSS files I have
been given have these.


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list