Hi I believe I have long time solution to the problems with the read.spss() funtion. In non-ascii locales the import of spss files into R has consistently produced errors and sometimes wouldn't allow import at all. I've made a custom version of the read.spss() function that appear to solve the problem for good. I may of course be wrong here. I believe the problem is that read.spss() tries to guess the codepage of the incoming spss file. In some (many?) non-ascii locales it mostly gets it wrong. The simple solution is to give the user the option to specifically tell read.spss() which codepage to expect and which codepage to translate to.
Duncan Murdoch
2008-Oct-02 13:05 UTC
[R] How do one suggest a patch for the Foreign package
In answer to your subject heading question: to suggest a patch, send an email to the package maintainer (as listed in the DESCRIPTION file). Your suggestion will get a better reception if you offer sample code/data to illustrate the problem, and a nicely written patch to the sources to fix it. (From your description below, it sounds as though you want to change the args to a function, so you'll need to patch the .Rd file for that function too.) Pay attention to the effect of your changes on existing code. Code that works now should not be broken by your change if it is at all possible to avoid that. Duncan Murdoch fsando wrote:> Hi I believe I have long time solution to the problems with the > read.spss() funtion. > > In non-ascii locales the import of spss files into R has consistently > produced errors and sometimes wouldn't allow import at all. > > I've made a custom version of the read.spss() function that appear to > solve the problem for good. I may of course be wrong here. > > I believe the problem is that read.spss() tries to guess the codepage of > the incoming spss file. In some (many?) non-ascii locales it mostly gets > it wrong. The simple solution is to give the user the option to > specifically tell read.spss() which codepage to expect and which > codepage to translate to. > > > > ------------------------------------------------------------------------ > > ______________________________________________ > 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. >