[Rd] Bug report in foreign library (PR#13425)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jan 4 15:21:13 CET 2009


On Sat, 3 Jan 2009, Nicholas Horton wrote:

> Peter,
>
> I run "update.packages()" regularly and may well have gotten this as a
> result. Alas, I don't log the results very carefully.

Yes 0.8-30 is an update on the Mac OS X distribution.  It was deliberately 
put out after 2.8.1 as we knew that some of the options were little tested 
(we neither have access to some of the 'foreign' programs nor test 
examples for many of the features).

In this case you could downgrade by re-installing the binary, or fix the 
sources and re-install.  The SVN archive has been updated, but I do not 
intend to put out a new release until I get some responses from those who 
reported bugs in 0-8-29 and have been asked to test if the bug is fixed.

>
> All the best,
>
> Nick
>
>
> On 1/3/09 6:46 PM, "Peter Dalgaard" <p.dalgaard at biostat.ku.dk> wrote:
>
>> nhorton at email.smith.edu wrote:
>>> here appears to be a bug in the foreign library.  The following code used to
>>> work, but now generates an error when 'package="SAS"' is specified:
>>>
>>> ds <- read.csv("http://www.math.smith.edu/sasr/datasets/help.csv")
>>> # running foreign package version 0.8-30
>>
>> That's one version ahead of the package in the 2.8.1 source tarball. Did
>> you upgrade or is the darwin binary out of sync?
>>
>>> library(foreign)
>>> # this works fine
>>> write.foreign(ds, "foo", "bar", package="Stata")
>>> # this yields an error
>>> write.foreign(ds, "foo", "bar", package="SAS")
>>> # Error in writeForeignSAS(df = list(id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L,  :
>>> #  object "dfn" not found
>>>
>>>
>>>
>>> There appears to be a space between < and - in foreign:::writeForeignSAS on
>>> or around line 15:
>>>
>>> dfn < - df
>>>
>>>         should be
>>>
>>> dfn <- df
>>
>> Yep. That is in 0.8-30 but not in -29...
>>
>>
>>>
>>> <<insert bug report here>>
>>>
>>>
>>>
>>> --please do not edit the information below--
>>>
>>> Version:
>>>  platform = i386-apple-darwin8.11.1
>>>  arch = i386
>>>  os = darwin8.11.1
>>>  system = i386, darwin8.11.1
>>>  status =
>>>  major = 2
>>>  minor = 8.1
>>>  year = 2008
>>>  month = 12
>>>  day = 22
>>>  svn rev = 47281
>>>  language = R
>>>  version.string = R version 2.8.1 (2008-12-22)
>>>
>>> Locale:
>>> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>>>
>>> Search Path:
>>>  .GlobalEnv, package:foreign, package:stats, package:graphics,
>>> package:grDevices, package:utils, package:datasets, package:methods,
>>> Autoloads, package:base
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> Nicholas Horton
> Department of Mathematics and Statistics, Smith College
> Clark Science Center, Northampton, MA 01063-0001
> http://www.math.smith.edu/~nhorton
>
> ______________________________________________
> 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



More information about the R-devel mailing list