Re: [Rd] grid unit bug? (PR#14220)

2010-02-24 Thread Prof Brian Ripley
is.numeric() is generic. So grid could include is.numeric.unit <- function(x) FALSE and register it in its namespace. Or Bert could define it in his application. On Thu, 25 Feb 2010, gunter.ber...@gene.com wrote: Paul: I figured that would be the problem. I encountered the issue when

Re: [Rd] proto and baseenv()

2010-02-24 Thread Ben
Wow, thanks for the heads-up. That is horrible behavior. But using baseenv() doesn't seem like the solution either. I'm new to proto, but it seems like this is also a big drawback: > z <- 1 > proto(baseenv(), expr={a=z})$a Error in eval(expr, envir, enclos) : object "z" not found -- Ben --

[Rd] proto and baseenv()

2010-02-24 Thread Peter Danenberg
I understand why the following happens ($.proto delegates to get, which ascends the parent hierarchy up to globalenv()), but I still find it anti-intuitive: > z <- 1 > y <- proto(a=2) > y$z [1] 1 Although this is well-documented behavior; wouldn't it uphold the principle of least surprise

Re: [Rd] grid unit bug? (PR#14220)

2010-02-24 Thread gunter . berton
Paul: I figured that would be the problem. I encountered the issue when I tries to check arguments in a validDetails method for a grob. Could one substitute the following function in the grid namespace? is.numeric <- function(x)if(is.unit(x))TRUE else is.numeric(x) (or make the first clause FA

Re: [Rd] Suppressing a warning from library()

2010-02-24 Thread Terry Therneau
The suppressWarnings construct looks like a good idea; I was not aware of it's existence. Thanks for the feedback. Terry T. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Suppressing a warning from library()

2010-02-24 Thread Prof Brian Ripley
On Wed, 24 Feb 2010, Terry Therneau wrote: I get a warning about "1 warning message" using R CMD check on the survival library. It comes from the code snippet: if (library(cmprsk, logical.return=TRUE)) { # further test of competing risks from survfit . . } Thi

[Rd] bug in "R Help on 'rmultinom()'" (PR#14222)

2010-02-24 Thread somorcik
Full_Name: Jan Somorcik Version: OS: Submission from: (NULL) (158.195.31.33) The explanation of "rmultinom()" in R Help contains an obvious bug. The original statement "The 'rmultinom()' algorithm draws binomials from Bin(n[j], P[j]) sequentially, where n[1] = N (N := 'size'), P[1] = p[1] (p i

Re: [Rd] Suppressing a warning from library()

2010-02-24 Thread Peter Dalgaard
Terry Therneau wrote: I get a warning about "1 warning message" using R CMD check on the survival library. It comes from the code snippet: if (library(cmprsk, logical.return=TRUE)) { # further test of competing risks from survfit . . } This is a very useful ad

Re: [Rd] [SoC] R and Google Summer of Code 2010: Call for Proposals

2010-02-24 Thread Dirk Eddelbuettel
On 24 February 2010 at 11:09, Philippe Grosjean wrote: | I have created the "projects" subsection in "developers". The Google | Summer of Code 2010 is at | http://rwiki.sciviews.org/doku.php?id=developers:projects:googlesummer2010 We dediced to make this http://rwiki.sciviews.org/doku.php?

[Rd] Suppressing a warning from library()

2010-02-24 Thread Terry Therneau
I get a warning about "1 warning message" using R CMD check on the survival library. It comes from the code snippet: if (library(cmprsk, logical.return=TRUE)) { # further test of competing risks from survfit . . } This is a very useful additional test when I'm c

[Rd] Typo in the man page of ?cutree (PR#14223)

2010-02-24 Thread phgrosjean
In the examples section of ?cutree (stats package): hc <- hclust(dist(USArrests)) cutree(hc, k=1:5)#k = 1 is trivial cutree(hc, h=250) ## Compare the 2 and 3 grouping: <<= SHOULD READ AS: "2 and 4 grouping" g24 <- cutree(hc, k = c(2,4)) table(g24[,"2"], g24[,"4"]) __

Re: [Rd] [SoC] R and Google Summer of Code 2010: Call for Proposals

2010-02-24 Thread Philippe Grosjean
Hello, I have created the "projects" subsection in "developers". The Google Summer of Code 2010 is at http://rwiki.sciviews.org/doku.php?id=developers:projects:googlesummer2010 Best, Philippe ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe

Re: [Rd] [SoC] R and Google Summer of Code 2010: Call for Proposals

2010-02-24 Thread Friedrich Leisch
> On Tue, 23 Feb 2010 22:27:46 -0600, > Dirk Eddelbuettel (DE) wrote: > On 23 February 2010 at 22:06, hadley wickham wrote: > | > So let us all start now by proposing some ideas for 2010.  It may make sense > | > to centralize and standardize this on wiki.r-project.org but until we

[Rd] O(N log N) impl of Kendall's Tau

2010-02-24 Thread David Simcha
I've attached an O(N log N) implementation of Kendall's Tau, which I hope will eventually replace the O(N^2) version currently implemented in R. For N = 30,000 it's several hundred times faster than the old version. The core algorithm comes with a lot of tests, which are included in the kenda

[Rd] survival package: Surv handles invalid intervals (start time > stop (PR#14221)

2010-02-24 Thread buhr
This is a multi-part message in MIME format. --080605010703060205070700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In the latest version of the survival package (2.35-8), the Surv function handles invalid intervals (where start time is