[Rd] typo in example(dbEscapeStrings) (PR#13521)

2009-02-12 Thread mayeul . kauffmann
Full_Name: Mayeul Kauffmann Version: 2.8.1 OS: x86_64-pc-linux-gnu (kubuntu) Submission from: (NULL) (86.200.212.40) The file /library/RMySQL/html/dbEscapeStrings.html documents dbEscapeStrings() In the example, an 's' is missing in line 3: ## Not run: tmp <- sprintf("select * from emp where ln

Re: [Rd] proposed simulate.glm method

2009-02-12 Thread Ben Bolker
Elsewhere (at least in lme4), refit(sim(model)) does the same thing [and so one would need something like apply(sim(model,1000),2,refit)]. sim() is quite interesting, as is Zelig, but I'm not sure I am ready to leap to it yet -- this was basically a suggestion that simulate.glm could be includ

Re: [Rd] proposed simulate.glm method

2009-02-12 Thread Alex D'Amour
There is functionality similar to this included in the Zelig package with it's "sim" method. The "sim" method goes a step further and replicates the fitted model's analysis on the generated datasets as well. I would suggest taking a look -- Zelig supports most (if not all) glm models and a wide ran

[Rd] proposed simulate.glm method

2009-02-12 Thread Ben Bolker
I have found the "simulate" method (incorporated in some packages) very handy. As far as I can tell the only class for which simulate is actually implemented in base R is lm ... this is actually a little dangerous for a naive user who might be tempted to try simulate(X) where X is a glm fit inst

Re: [Rd] Why is srcref of length 6 and not 4 ?

2009-02-12 Thread hadley wickham
> I am using this to massage the output of "parse" into a data frame to > represent it as a tree > (see http://addictedtor.free.fr/misc/sidekick.png) You might also want to take a look at http://github.com/hadley/eval.with.details/blob/master/R/parse.r where I'm trying to do something similar for

Re: [Rd] Why is srcref of length 6 and not 4 ?

2009-02-12 Thread Romain Francois
Duncan Murdoch wrote: On 12/02/2009 7:01 AM, Romain Francois wrote: Hello, Consider this file (/tmp/test.R) : f <- function( x, y = 2 ){ z <- x + y print( z ) } I get this in R 2.7.2 : > p <- parse( "/tmp/test.R" ) > str( attr( p, "srcref" ) ) List of 1 $ :Class 'srcref' atomic [1

Re: [Rd] Why is srcref of length 6 and not 4 ?

2009-02-12 Thread Duncan Murdoch
On 12/02/2009 7:01 AM, Romain Francois wrote: Hello, Consider this file (/tmp/test.R) : f <- function( x, y = 2 ){ z <- x + y print( z ) } I get this in R 2.7.2 : > p <- parse( "/tmp/test.R" ) > str( attr( p, "srcref" ) ) List of 1 $ :Class 'srcref' atomic [1:4] 1 1 4 1 .. ..- att

[Rd] Spearman's rank correlation test

2009-02-12 Thread Petr Savicky
Hi All: help(cor.test) claims For Spearman's test, p-values are computed using algorithm AS 89. Algorithm AS 89 was introduced by the paper D. J. Best & D. E. Roberts (1975), Algorithm AS 89: The Upper Tail Probabilities of Spearman's rho. Applied Statistics, Vol. 24, No. 3, 377-379. Table

[Rd] Why is srcref of length 6 and not 4 ?

2009-02-12 Thread Romain Francois
Hello, Consider this file (/tmp/test.R) : f <- function( x, y = 2 ){ z <- x + y print( z ) } I get this in R 2.7.2 : > p <- parse( "/tmp/test.R" ) > str( attr( p, "srcref" ) ) List of 1 $ :Class 'srcref' atomic [1:4] 1 1 4 1 .. ..- attr(*, "srcfile")=Class 'srcfile' length 4 and this

[Rd] Patch for src/main/character.c, systematizing recent fix to do_grep

2009-02-12 Thread Wacek Kusnierczyk
The attached patch provides a modification to the recent fix/improvement to do_grep already included in the most recent development version. The original fix added new functionality to the grep function by adding a new parameter, 'invert'. In the source code for the underlying do_grep, the value

Re: [Rd] setClassUnion with numeric; extending class union

2009-02-12 Thread Sklyar, Oleg (London)
Hi John, sorry for not posting more info. Strangely I get warnings about setClassUnion with numeric in a very special case: if I define it in a clean R session then there are no warnings, however if I load a number of my packages where there are other classes derived from numeric and exported then