Displaying 20 results from an estimated 10000 matches similar to: "Now another question regarding the Foreign package"
2006 Apr 16
3
Reading SPSS .sav files
Greetings,
How to I read in SPSS .sav files into R.
Thank you.
David
=====================================
David Kaplan, PhD
Professor of Education
School of Education
University of Delaware
Newark DE 19716
Voice: 302-831-8696
Fax: 302-831-4110
email: mailto:dkaplan at udel.edu
Homepage:
2006 Sep 29
3
What is wrong with this input
I can't seem to figure out why I'm getting this error. The output is
copied right off the screen. Notice how in some cases the back slash is
missing. In other cases, it can't read a file that I know is there.
Thanks in advance
> library(foreign)
> hrout <- read.spss("c:\\hrab200.sav")
Error in read.spss("c:\\hrab200.sav") : unable to open file
2006 May 11
3
Newbie question about read.table
Hi
When I use the read.table function with header = T, I notice that it gives me the variable names along the top as I expect. But, when I then attempt an analysis, e.g. regression, it doesn't recognize the variable names. Am I missing a step.
Thank you
David
[[alternative HTML version deleted]]
2006 Sep 30
1
R 2.3.1 and SPSS 14.0
Hi,
Are there any incompatibilities with R 2.3.1 and SPSS 14.0 with regard
to the read.spss command?
Thanks in advance.
David
--
========================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
Educational Sciences, Room 1061
1025 W. Johnson Street
Madison, WI 53706
email: dkaplan
2006 Nov 29
3
Aggregating data
[This email is either empty or too large to be displayed at this time]
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'
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
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
2003 Aug 27
4
read.spss (package foreign) and character columns
Dear R users!
I am using R Version 1.7.1, Windows XP, package "foreign" (Version: 0.6-1),
SPSS 11.5.1.
There is one thing I noticed with "read.spss", and I'd like to ask if this
is considered to be a feature, or possibly a bug:
When reading character columns, character strings seem to get filled with
blanks at the end.
Simple example:
In SPSS, create a file with one
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
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
2010 Dec 06
3
Please help with write.foreign(SPSS)
Dear all,
I get stuck when i try to export the data into SPSS format/file using
"write.foreign()"
Do you know how to do it exactly?
What i have done is
1) First i type the following code in R:
df<-data.frame(id,year,res1)
names(df)<-c("idcode","year","resarrvl")
2011 Mar 25
2
library(foreign) read.spss warning
I got the following:
> library(foreign)
> swal = read.spss("swallowing.sav", to.data.frame =TRUE)
Warning message:
In read.spss("swallowing.sav", to.data.frame = TRUE) :
swallowing.sav: Unrecognized record type 7, subtype 21 encountered in system file
>
The bulk of the data seems to read in a usable form, but I'm curious about what might be getting lost
2009 Feb 17
2
spss-file problem with foreign 0.8-32
Hi,
after updating to foreign version 0.8-32, I experienced the following error
when I tried to load a SPSS file:
Fehler in inherits(x, "factor") : objekt "cp" nicht gefunden
Zus?tzlich: Warning message:
In read.spss("***l.sav", use.value.labels = TRUE, to.data.frame = TRUE) :
***.sav: File-indicated character representation code (1252) looks like a
Windows
2002 Aug 28
2
Package foreign
....in example
data <- read.spss("c:/data.sav",use.value.label=F,to.data.frame=T)
try help(read.spss) !
regards,christian
kjetilh at umsanet.edu.bo schrieb am 28.08.02 02:08:39:
> Hola!
>
> Can the foreign package now read data from spss 10?
>
> Kjetil Halvorsen
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help
2007 Oct 23
2
A very simple question
Hi all,
My apologies for a very simple question. I just downloaded
R 2.6.0. I want to bring in all of the objects from 2.5.0
that I see when I type ls(). I have no idea how to do that.
Thanks in advance.
David
--
=======================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
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:
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
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