Re: [Rd] implementation of NULL in vectors

2009-01-03 Thread Prof Brian Ripley
On Sat, 3 Jan 2009, Mark Rosen wrote: All, I was wondering if someone could point me to the location of the code in R that supports NULL values in vectors. I'm curious as to how you implemented them. We don't allow NULL in atomic vectors. The 'R Internals' manual discusses such implementatio

[Rd] implementation of NULL in vectors

2009-01-03 Thread Mark Rosen
All, I was wondering if someone could point me to the location of the code in R that supports NULL values in vectors. I'm curious as to how you implemented them. The only possible solution to me seems that for a double [], you need to keep a parallel bool [] that tells you whether the value is nu

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

2009-01-03 Thread Peter Dalgaard
nhor...@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 on

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

2009-01-03 Thread nhorton
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 library(foreign) # this works fine write.for

Re: [Rd] (PR#13423) bug report: writeForeignSAS in package "foreign"

2009-01-03 Thread Prof Brian Ripley
And did you want to report a bug? On Fri, 2 Jan 2009, ken_klein...@hms.harvard.edu wrote: function (df, datafile, codefile, dataname = "rdata", validvarname = c("V7", "V6")) { factors <- sapply(df, is.factor) strings <- sapply(df, is.character) dates <- sapply(df, FUN = function(x)

[Rd] bug report: writeForeignSAS in package "foreign" (PR#13423)

2009-01-03 Thread ken_kleinman
function (df, datafile, codefile, dataname = "rdata", validvarname = c("V7", "V6")) { factors <- sapply(df, is.factor) strings <- sapply(df, is.character) dates <- sapply(df, FUN = function(x) inherits(x, "Date") || inherits(x, "dates") || inherits(x, "date")) xdates <-

Re: [Rd] (PR#13424) Missing PROTECT in intern_getwd (in util.c)

2009-01-03 Thread Prof Brian Ripley
On Sat, 3 Jan 2009, mi...@sonic.net wrote: Full_Name: Stephen Milborrow Version: 2.8.1 OS: WinXP Submission from: (NULL) (198.54.202.150) There is a missing PROTECT in intern_getwd in util.c. The current code is rval = allocVector(STRSXP, 1); SET_STRING_ELT(rval, 0, mkCharCE(buf, CE_UTF8));

[Rd] Missing PROTECT in intern_getwd (in util.c) (PR#13424)

2009-01-03 Thread milbo
Full_Name: Stephen Milborrow Version: 2.8.1 OS: WinXP Submission from: (NULL) (198.54.202.150) There is a missing PROTECT in intern_getwd in util.c. The current code is rval = allocVector(STRSXP, 1); SET_STRING_ELT(rval, 0, mkCharCE(buf, CE_UTF8)); and should be (because mkCharCE can alloca