Hans Ekbrand wrote:
On Wed, Apr 08, 2009 at 04:17:51PM +0200, Peter Dalgaard wrote:
Hans Ekbrand wrote:
Someone running foreign 8.34 that is willing to test my SPSS-file?
Someone with an SPSS file problem willing to help test the prereleases? :-)

http://sociologi.cjb.net/temp/test.sav

No joy.

> read.spss("~/Desktop/downloads/test.sav", reencode = "latin1")
Error in read.spss("~/Desktop/downloads/test.sav", reencode = "latin1") :
  error reading system-file header
In addition: Warning message:
In read.spss("~/Desktop/downloads/test.sav", reencode = "latin1") :
~/Desktop/downloads/test.sav: position 143: Variable name begins with invalid character

(I suppose the actual culprit could be number 144 which does indeed start with an A-ring ("ÅLDKAT"))

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....

--
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalga...@biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to