similar to: Converting factors back to numbers. Trouble with SPSS import data

Displaying 20 results from an estimated 20000 matches similar to: "Converting factors back to numbers. Trouble with SPSS import data"

2009 Mar 03
1
SPSS data import: problems & work arounds for GSS surveys
I'm using R 2.8.1 on Ubuntu 8.10. I'm writing partly to ask what's wrong, partly to tell other users who search that there is a work around. The General Social Survey is a long standing series of surveys provided by NORC (National Opinion Research Center). I have downloaded some years of the survey data in SPSS format (here's the site:
2010 Jan 12
1
read.spss: option "to.data.frame" and string variables
Dear R-users, I am using R version 2.10.1 and package foreign version 0.8-39 under windows. When reading .sav-Files (PASW Statistics 18.0.1) containing string variables, these are automatically converted to factors when using option "to.data.frame = TRUE" (see example below). It's clear to me why this happens (the default behaviour of a call to as.data.frame). But this is not
2004 Nov 06
3
foreign(read.spss) in rw2000 and re2001beta
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) 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
2008 Dec 14
1
re ad.spss (foreign) conflict with SPSS 17 files.
SPSS seems to have changed its default datafile format, resulting in issues for read.spss(). In Windows this results in a warning, in Debian the import completely fails: Debian (R version 2.8.0 (2008-10-20) i486-pc-linux-gnu, foreign_0.8-29) > read.spss("/home/jeroen/samples/Tomato.sav") Error in iconv(names(rval), cp, "") : unsupported conversion from 'CP65001'
2008 Aug 01
1
importing explicitly declared missing values in read.spss (foreign)
There is a problem when importing an spss-file containing explicitly declared missing values in R using the read.spss function from the foreign package. I'm not sure these problems are the same in every version of spss, I am using the latest version 16.0.2. I included http://www.nabble.com/file/p18776776/missingdata.sav missingdata.sav and
2009 Feb 07
2
reading SPSS .sav files (PR#13509)
Full_Name: Roger Newton Version: 2.8.1 OS: windows 2000 Submission from: (NULL) (80.176.228.157) I have an elderly version of SPSS (version 11) which I still use. R Version 2.6.1 would, and still will, read SPSS *.sav files produced by SPSS version 11. R version 2.8.1 which I installed two days ago (05/02/09) reports an error and shuts down when trying to read SPSS version 11 *.sav files using
2003 Aug 10
1
read.spss doesn't work anymore
A couple of months ago, probably using an older version of R, R used to run the following code just fine: library("foreign") data.exp1 <- as.data.frame(read.spss("dataDef.sav")) Issuing the same commands now (after starting R using --vanilla), gives me the following behavior: > library("foreign") > x <- read.spss("dataDef.sav") Error
2007 Apr 05
1
read.spss (package foreign) and SPSS 15.0 files
Hello, does anyone have experience with reading SPSS Version 15.0 files into R (version 2.4.1, WinXP)? I have long been sucessfully reading SPSS files with read.spss from the wonderful foreign package, but somehow after upgrading from SPSS14 to SPSS15 I seem to have problems. Trying a simple example, where test.sav is a SPSS 15.0 data file consisting of x1=c(1,2,3) and
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi, It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get). But no matter which way I do import the data, user-defined missings from Spss are always lost. (it makes no difference if there are a single value, a range, or any combination of them. They are always ignored). Is there any way in R to find out if any value was user-defined missing
2012 Dec 03
2
How to read SPSS file in R
Dear R-users, I have som troubles with .sav file. How is it possible for us R-users to read SPSS files. I know that is possible, I tried the following: > library(foreign) > Corp<-read.spss("/Users/kama/Analysis/Corporation.sav", header=TRUE, > sep=",") Error in read.spss("/Users/kama/Analysis/Corporation.sav", header = TRUE, : unused
2004 Mar 03
2
read.spss and time/date information
I don't use SPSS but following through on your detective work can provide the likely answer. First note that both date numbers are evenly divisible by the number of seconds in a day, i.e. 24*60*60. This suggests that these numbers are seconds since some origin. Since we know "2003/02/11" corresponds to 13264300800 we deduce that the origin must be spss.orig <-
2010 Sep 28
2
Problema con read.spss
Hola, Tengo problemas a la hora de cargar un archivo que originalmente está en SPSS. Trabajo con Fedora y uso R mediante el plugin Rgedit en gedit. Además en Fedora no tengo SPSS, sino PSPP Para cargar el archivo he probado estas dos cosas (escribo también el mensaje de error que me genera R): >library_(foreign) >read.spss("guille.sav",to.data.frame = T) Error en
2003 Nov 04
5
read.spss Error reading system-file header
Is there any documentation on what kind of SPSS file can and cannot be read by read.spss? Alternatively, how can one modify or "clean" an SPSS file to make it readable by read.spss? What properties must a *.sav file before read.spss can read it? The file in this example is 270KB, with 5 rows and 173 columns. I have no trouble reading larger files with read.spss, so it's not
2010 Jun 18
1
Read SPSS v 18 .sav file
Hi, I repeatedly get an error when trying to read an SPSS v. 18 .sav file into R. > require(foreign) Loading required package: foreign > femaleSPSS.dat <- read.spss("female-04-02-2010.sav") Warning message: In read.spss("female-04-02-2010.sav") : female-04-02-2010.sav: Unrecognized record type 7, subtype 18 encountered in system file > However, read.spss works
2007 Feb 16
1
SPSS and library(foreign)
Hi, I have a valid SPSS .sav file (which I can open happily in SPSS v11 on Windows XP). Opening it in R2.41 on Linux we get this message :- > HSE3023 <- read.spss("HSE.sav") Error in read.spss("HSE.sav") : error reading system-file header In addition: Warning message: HSE.sav: Variable X234 indicates variable label of invalid length 256 Now variable X234 has indeed a
2012 Feb 15
1
read.spss issues
Someone supplied me with a small SPSS datafile that caused a buffer overflow and then a crash when reading it in R. It seems like a pretty serious issue to me. Unfortunately I can't supply the dataset at hand and I have a hard time reproducing it with a toy example. But I found at least 2 issues that might be related. The first one is that when the spss dataset has a 'string' variable
2010 Jul 16
1
re ading SPSS .sav files (PR#13509)
Sir/Madam, Installed in my computer is the Version 2.9.1(2009-06-26) of R. I have a SPSS.sav file produced by SPSS Version 17. >install.('foreign') >library(foreign) <- read.spss("f:/sme.sav",use.value.labels=FALSE) Warning message: In read.spss("f:/sme.sav", use.value.labels = FALSE) : f:/sme.sav: Unrecognized record type 7, subtype 18
2008 Aug 19
2
how to import from SPSS without shortening variable names
Hello, as I import '.sav' files from SPSS, the variable names are shortened to 8 uppercase characters: "sex_of_therapist" will become "SEX_OF_TH" Is there a way around this? How can I retrieve the full names? Greets from Southern Germany, Timo Stolz
2004 Mar 12
6
still spss
hi again, i still cannot open the file in spss :( i type: library(foreign) read.spss("H:\\Desktop\\bd1\\experiencia1") and the error comes: Error in read.spss("H:\\Desktop\\bd1\\experiencia1") : unable to open file can you help me? margarida,portugal
2004 Jul 26
3
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