[R] read.spss, locale and encodings

Hans Ekbrand hans.ekbrand at sociology.gu.se
Wed Apr 8 19:58:51 CEST 2009


On Wed, Apr 08, 2009 at 07:12:23PM +0200, Peter Dalgaard wrote:
> Apparently, you can work around it like this
>
> lc <- Sys.setlocale("LC_CTYPE")
> Sys.setlocale("LC_CTYPE", "da_DK")
> x <- read.spss("~/Desktop/downloads/test.sav", reencode = "latin1")
> Sys.setlocale("LC_CTYPE", lc)
>
> -- which doesn't strike me as particularly logical, but whatever works....

THANKS a lot Peter! This works perfectly! I had been struggling with
this problem way too long...

-- 
Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net>
GnuPG key: 1024D/7050614E
Fingerprint: 1408 C8D5 1E7D 4C9C C27E 014F 7C2C 872A 7050 614E
Learn about secure email at http://www.gnupg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090408/f8f38783/attachment-0002.bin>


More information about the R-help mailing list