Karl Knoblick
2004-Jul-26 08:36 UTC
[R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error)
Hallo! I read SPSS data in the following way: library(Hmisc) library(foreign) dat<-spss.get("surv_abb.sav") In R1.9.1 I got the message: "Error in all(arg == choices) : Object "typeDate" not found" In R1.8.0 the same script works fine. Does anybody know a possibilty to read a SPSS file under R1.9.1? Thanks! Karl
Jonathan Baron
2004-Jul-26 10:31 UTC
[R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error)
On 07/26/04 10:36, Karl Knoblick wrote:>Hallo! > >I read SPSS data in the following way: > >library(Hmisc) >library(foreign) >dat<-spss.get("surv_abb.sav") > >In R1.9.1 I got the message: >"Error in all(arg == choices) : Object "typeDate" not >found" > >In R1.8.0 the same script works fine. > >Does anybody know a possibilty to read a SPSS file >under R1.9.1?I cannot find spss.get in the man pages for the current version of foreign. It works for me with read.spss. But I'm surprised it ever worked. So, possibly, there is something wrong with the spss file you are trying to import. Jon -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page: http://www.sas.upenn.edu/~baron R search page: http://finzi.psych.upenn.edu/
Thomas Lumley
2004-Jul-26 15:28 UTC
[R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error)
On Mon, 26 Jul 2004, [iso-8859-1] Karl Knoblick wrote:> Hallo! > > I read SPSS data in the following way: > > library(Hmisc) > library(foreign) > dat<-spss.get("surv_abb.sav") > > In R1.9.1 I got the message: > "Error in all(arg == choices) : Object "typeDate" not > found" > > In R1.8.0 the same script works fine. > > Does anybody know a possibilty to read a SPSS file > under R1.9.1? >YOu should just be able to use read.spss in the "foreign" package. -thomas
Sara Drew
2004-Jul-27 12:18 UTC
[R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error)
I have had the same problem (or at least get the same error msg) using the spss.get() function from Hmisc using R1.9.1 to read an SPSS file. I think read.spss() from foreign package still works though. Have not tried spss.get() with any other version of R. -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Thomas Lumley Sent: Monday, July 26, 2004 7:29 AM To: Karl Knoblick Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error) On Mon, 26 Jul 2004, [iso-8859-1] Karl Knoblick wrote:> Hallo! > > I read SPSS data in the following way: > > library(Hmisc) > library(foreign) > dat<-spss.get("surv_abb.sav") > > In R1.9.1 I got the message: > "Error in all(arg == choices) : Object "typeDate" not > found" > > In R1.8.0 the same script works fine. > > Does anybody know a possibilty to read a SPSS file > under R1.9.1? >YOu should just be able to use read.spss in the "foreign" package. -thomas ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html