Re: [Rd] inconsistencies between ?class and ?UseMethod

2012-12-05 Thread cberry
t; afun(matrix(1L,nc=1)) integer 1 > afun.fooey <- function(x) NextMethod() > my.mat <- matrix(1L,nc=1) > afun(my.mat) matrix 1 > class(my.mat) <- "fooey" > afun(my.mat) Error in NextMethod() : no method to invoke > > Anyway, an update to ?UseMethod would be welc

Re: [Rd] How does .Fortran "dqrls" work?

2012-04-27 Thread cberry
qrls", > fittt$coefficients also equals to c(1,1). That means the .Fortran("dqrls", > qr=qr,n=n,p=p,...) did nothing to the coefficients! I don't know why, is > there anything I did wrong or missed? How can I get the result from "dqrls" > as what

Re: [Rd] An example of very slow computation

2011-08-17 Thread cberry
John C Nash writes: > This message is about a curious difference in timing between two ways of > computing the > same function. One uses expm, so is expected to be a bit slower, but "a bit" > turned out to > be a factor of >1000. The code is below. We would be grateful if anyone can > point ou