From ripley at stats.ox.ac.uk  Sat Nov  6 15:55:47 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat Nov  6 15:55:51 2004
Subject: [Rd] foreign(read.spss) in rw2000 and re2001beta
In-Reply-To: <418CE35B.1000502@acelerate.com>
Message-ID: <Pine.LNX.4.44.0411061454300.26999-100000@gannet.stats>

On Sat, 6 Nov 2004, Kjetil Brinchmann Halvorsen wrote:

> I encountered something strange with read.spss (package foreign, version 
> 0.7 with R2.0.0 and
> version 0.8 with R2.0.1 beta, windows XP)

Please clarify: the same thing in both versions (read.spss has not changed 
between them)?

> 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. Using the 
> argument
> use.value.labels=FALSE, everything is read as expected.

Can you make that file available please?

> test <- read.spss("test.sav", to.=TRUE)
> test > only NA's
> 
> Kjetil
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] foreign(read.spss) in rw2000 and re2001beta
Prof Brian Ripley