Re: [Rd] cache most-recent dispatch

2013-07-01 Thread Hervé Pagès
Hi Val, [off list... I don't want to compromise your chances to start a constructive discussion ;-)] Thanks for reporting this. Just wanted to mention that the reason I think the situation is worst when you use the paste() generic defined in BiocGenerics than when you make paste() a generic with

[Rd] cache most-recent dispatch

2013-07-01 Thread Valerie Obenchain
Hi, S4 method dispatch can be very slow. Would it be reasonable to cache the most recent dispatch, anticipating the next invocation will be on the same type? This would be very helpful in loops. fun0 <- function(x) sapply(x, paste, collapse="+") fun1 <- function(x) { paste <-

Re: [Rd] Problem with anova and the new abbreviation restrictions

2013-07-01 Thread Peter Meilstrup
On Mon, Jul 1, 2013 at 1:51 PM, Terry Therneau wrote: > > afit <- anova(lm(conc ~ uptake, CO2)) > > afit$P > [1] 2.905607e-06 NA > Warning message: > In `$.data.frame`(afit, P) : Name partially matched in data frame > > afit$Pr(>F) > Error: unexpected '>' in "afit$Pr(>" > > The second i

Re: [Rd] relist() is broken when the skeleton is a list with empty list elements

2013-07-01 Thread Hervé Pagès
Hi, On 06/07/2013 03:08 PM, Hervé Pagès wrote: Hi, relist() is broken when the skeleton is a list with empty list elements: > x <- list(1:3, integer(0), 11:14) > relist(unlist(x), x) [[1]] [1] 1 2 3 [[2]] [1] 11 3 [[3]] [1] 11 12 13 14 Hard to believe that such a b

Re: [Rd] Problem with anova and the new abbreviation restrictions

2013-07-01 Thread Hadley Wickham
On Mon, Jul 1, 2013 at 3:51 PM, Terry Therneau wrote: > An unwanted side effect of the new restrictions on abrreviated names. > > The anova.coxph command, in a slavish copy of anova.lm etc, returns a data > frame with column labels of > loglik Chisq Df Pr(>|Chi|) > > If one tries to extract

[Rd] Problem with anova and the new abbreviation restrictions

2013-07-01 Thread Terry Therneau
An unwanted side effect of the new restrictions on abrreviated names. The anova.coxph command, in a slavish copy of anova.lm etc, returns a data frame with column labels of loglik Chisq Df Pr(>|Chi|) If one tries to extract the final column of the table errors result since it is not a

[Rd] dotchart.R and left margin

2013-07-01 Thread Stephen Weigand
Hello, In trying to minimize the margin on the left hand side when using dotchart I found what may be a typo in the code. In the lines below from dotchart.R, should nmai[4L] be nmai[2L]? if (!(is.null(labels) && is.null(glabels))) { nmai <- par("mai") nmai[2L] <- nmai[4L] + max(linch + goff

Re: [Rd] tests conditioned on CRAN?

2013-07-01 Thread Henrik Bengtsson
"On CRAN servers" or ""R CMD check --as-cran"? I assume you mean the former. The way I do it is "the other way around", i.e. to condition on running locally or not such that the default is not to run or to run a smaller test case: if (Sys.getenv("_R_CHECK_FULL_") == "") { # Default/no test } e