Skip to content
Back to formatted view

Raw Message

Message-ID: <4FDA97D8-2386-489D-8148-6143E377F86A@r-project.org>
Date: 2009-09-14T16:09:30Z
From: Simon Urbanek
Subject: Problem reading SPSS-file in R!
In-Reply-To: <BLU135-W438E551DBC5704C41BB0FBAE40@phx.gbl>

On Sep 14, 2009, at 11:25 , Johan Ohlander wrote:

>
> Hello,
> I am using the latest version of R (2.9.2 GUI 1.29 Tiger build 32- 
> bit (5464)) and SPSS version 16.0. This is on a MacBook with OSX  
> Snow Leopard. I have a problem reading an SPSS-file in R.
>
> I do as following:
>
> require(foreign)
> mydata <- read.spss("filename.sav",use.value.labels = TRUE,  
> to.data.frame = TRUE)
>
> but I only get the answer:
>
> re-encoding from latin9
> Error in iconv(names(rval), cp, "") :
>  unsupported conversion from 'latin9' to ''
>

latin9 is not a supported alias on OS X, you may want to use the full  
name of the encoding, i.e., reencode="ISO-8859-15" (if it is really  
latin9).

[It probably needs to be fixed either in foreign (because it should  
know better than to not use latin9) or in R (if we want to support the  
latin9) ...]

Cheers,
Simon


>
> Does anybody have an idea why this happens and also what I can do to  
> make things work as they should. I have no problem with my work  
> computer, that has Windows and SPSS version 15.0.
> Many thanksJohan
> _________________________________________________________________
>
>
> ery-edit.aspx
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>