[R-SIG-Mac] new to R and Zelig, problem loading data
Brian D Ripley
ripley at stats.ox.ac.uk
Thu Feb 12 18:39:42 CET 2009
So, this is using package foreign, not Zelig, to read the file.
Credit where credit is due ....
Look at the help page for read.spss:
reencode: logical: should character strings be re-encoded to the
current locale. The default, 'NA', means to do so in a UTF-8
locale, only. Alternatively character, specifying an
encoding to assume.
So all you need to know is what CP28591 is. It seems to be "latin1",
so please try that. (The next release of 'foreign' will know to try
that, but we've never seen an actual SPSS file with it in.)
On Thu, 12 Feb 2009, Hillard Pouncy wrote:
> I just got started working with R and Zelig. I am trying to load an spss
> data file and I got this error message.
> Error in iconv(names(rval), cp, "") :
> unsupported conversion from 'CP28591' to ''
> In addition: Warning message:
> In read.spss("philfile.sav", to.data.frame = TRUE) :
> philfile.sav: File-indicated character representation code (28591) looks
> like a Windows codepage
> [[alternative HTML version deleted]]
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-SIG-Mac