Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 16/07/2009 5:06 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in

Re: [Rd] Handling masked methods

2009-07-16 Thread Gad Abraham
On 16/7/09 12:18 PM, Duncan Murdoch wrote: Gad Abraham wrote: Hi, Say I have two packages, test1 and test2, that both define the generic method train (identical definition), and each has a specific train method for a different S4 object (foo and bar, resp.) I want to be able to call train(foo,

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 16/07/2009 5:06 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan,

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an e

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at th

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at the C code too and was able to recognize a p

Re: [Rd] ... gctorture(TRUE) segfault etc

2009-07-16 Thread Martin Maechler
> "MM" == Martin Maechler > on Thu, 16 Jul 2009 17:56:07 +0200 writes: ... HP> This seems to have been around for a while (I get this with R 2.10, HP> 2.9 and 2.8). Note that I don't get this with an unnamed vector. HP> This problem affects the methods packa

Re: [Rd] Incorrect comment about ISNA(x) in Arith.h (PR#13826)

2009-07-16 Thread maechler
> Tim Hesterberg > on Tue, 14 Jul 2009 06:15:17 +0200 (CEST) writes: > R-2.9.0/include/R_ext/Arith.h has: > int R_IsNA(double); /* True for R's NA only */ > int R_IsNaN(double); /* True for special NaN, *not* for NA */ > int R_finite(double);

Re: [Rd] ... gctorture(TRUE) segfault etc

2009-07-16 Thread Martin Maechler
> "HP" == Hervé Pagès > on Wed, 15 Jul 2009 17:08:20 -0700 writes: HP> Hi, >> x <- c(a=10, b=20) >> length(x) <- 1 >> x HP> a HP> 10 HP> But with gctorture turned on, I get: >> gctorture(TRUE) >> x <- c(a=10, b=20) >> length(x) <- 1 >> x

Re: [Rd] Dynamic help pages

2009-07-16 Thread Martin Maechler
> "DM" == Duncan Murdoch > on Wed, 15 Jul 2009 16:07:13 -0400 writes: DM> On 7/15/2009 9:47 AM, Duncan Murdoch wrote: >> I've just committed code that allows R to be built with support for >> dynamic help pages using \Sexpr in Rd files. Define USE_NEW_HELP and >> th

[Rd] model.matrix memory problem (PR#13838)

2009-07-16 Thread Torsten . Hothorn
Hi, `model.matrix' might kill R with a segfault (on a illposed problem, but anyway): mydf <- as.data.frame(sapply(1:40, function(i) gl(2, 100))) f <- as.formula(paste("~ - 1 + ", paste(names(mydf), collapse = ":"), sep = "")) X <- model.matrix(f, data = mydf) *** caught segfault *** address 0

[Rd] Semi-automated testing of function with GUI-inputs?

2009-07-16 Thread Ulrike Grömping
Dear DevelopeRs, I have written a version of function fix for my class design (data frame with attributes) that is supposed to allow users to type in some additional variables, while preserving the attributes, as long as no forbidden edits (like changes to the experimental factors) are done. It

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at the C code too and was able to recognize a pattern that is indeed e