Hi, I'm running R 2.8.1 on Ubuntu, and today I got updates for a couple of packages, including foreign (r-cran-foreign, now at version 0.8.32). Subsequent to the upgrade, attempts to invoke read.spss produce the following error: Error in inherits(x, "factor") : object "cp" not found and the call to read.spss fails. I forced a downgrade to 0.8.26, and read.spss works again. Cheers, Paul Rubin
Update today broke foreign package (PR#13533)
4 messages · rubin at msu.edu, Brian Ripley, HBaize +1 more
foregin_0.8-32 was testsd aginst 2.8.1 prior to release, and I've just tested it again. This might be a locale issue (but I also tested in a latin1 and C locale), but I think it is specific to some files. So can we have both the output of sessionInfo() and a file that causes the problem (it appears not to be one of the test files in the 'tests' subdirectory), and I'll investigate further.
On Mon, 16 Feb 2009, rubin at msu.edu wrote:
Hi, I'm running R 2.8.1 on Ubuntu, and today I got updates for a couple of packages, including foreign (r-cran-foreign, now at version 0.8.32). Subsequent to the upgrade, attempts to invoke read.spss produce the following error: Error in inherits(x, "factor") : object "cp" not found and the call to read.spss fails. I forced a downgrade to 0.8.26, and read.spss works again. Cheers, Paul Rubin
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
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
I posted links to five SPSS .sav files in response to a very similar problem with read.spss(). Maybe you can use them to test the function. http://www.nabble.com/reading-SPSS-.sav-files-(PR-13509)-td21889920.html So can we have both the output of sessionInfo() and a file that causes the problem (it appears not to be one of the test files in the 'tests' subdirectory), and I'll investigate further.
On Mon, 16 Feb 2009, rubin at msu.edu wrote:
View this message in context: http://www.nabble.com/Update-today-broke-foreign-package-%28PR-13533%29-tp22045004p22052065.html Sent from the R devel mailing list archive at Nabble.com.
Prof Brian Ripley wrote:
foregin_0.8-32 was testsd aginst 2.8.1 prior to release, and I've just tested it again. This might be a locale issue (but I also tested in a latin1 and C locale), but I think it is specific to some files.
I have this with a codepage 1252 file as well. From my reply to Harry
Haupt on R-help (copied here for the sake of the bug repository):
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).
So can we have both the output of sessionInfo() and a file that causes the problem (it appears not to be one of the test files in the 'tests' subdirectory), and I'll investigate further. On Mon, 16 Feb 2009, rubin at msu.edu wrote:
Hi, I'm running R 2.8.1 on Ubuntu, and today I got updates for a couple of packages, including foreign (r-cran-foreign, now at version 0.8.32). Subsequent to the upgrade, attempts to invoke read.spss produce the following error: Error in inherits(x, "factor") : object "cp" not found and the call to read.spss fails. I forced a downgrade to 0.8.26, and read.spss works again. Cheers, Paul Rubin
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
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