spss-file problem with foreign 0.8-32
Peter Dalgaard wrote:
Yes, something in the logic appears to have gotten garbled.
It's in this part of read,spss:
if (is.character(reencode)) {
cp <- reencode
reencode <- TRUE
}
else if (codepage <= 500 || codepage >= 2000) {
attr(rval, "codepage") <- NULL
reencode <- FALSE
}
else if (m <- match(cp, knownCP, 0L))
cp <- names(knownCP)[m]
if you get to the 2nd "else if" then cp is unset. Possible the attempted
match should be of codepage? But it still looks wrong: Why restrict to
codepages between 500 and 2000 when knownCP contains several values
above 10000???
A workaround is to set reencode="ascii" (or whatever is relevant).
--
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.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
______________________________________________ R-help at 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.
Dear Peter, thanks, reencode="ascii" fixed it (and leaves just the warning message, which seems to have no effect). Best, Harry ----- --- Centre for Statistics Bielefeld University, Germany
View this message in context: http://www.nabble.com/spss-file-problem-with-foreign-0.8-32-tp22059259p22060774.html Sent from the R help mailing list archive at Nabble.com.