[Rd] [patch] Fix typo in 'rank' documentation

2017-08-24 Thread Jonathan Armond
I noticed a typo in the documentation for the 'rank' function. Specifically, it describes ties.method="first" and contrasts with... ties.method="first", when it should be ties.method="last". Thanks, Jon Index: src/library/base/man/rank.Rd ===

Re: [Rd] [patch] Fix typo in 'rank' documentation

2017-08-24 Thread Martin Maechler
> Jonathan Armond > on Thu, 24 Aug 2017 07:10:08 +0100 writes: > I noticed a typo in the documentation for the 'rank' function. > Specifically, it describes ties.method="first" and contrasts with... > ties.method="first", when it should be ties.method="last". > Thanks

[Rd] Are r2dtable and C_r2dtable behaving correctly?

2017-08-24 Thread Gustavo Fernandez Bayon
Hello, While doing some enrichment tests using chisq.test() with simulated p-values, I noticed some strange behaviour. The computed p-value was extremely small, so I decided to dig a little deeper and debug chisq.test(). I noticed then that the simulated statistics returned by the following call

[Rd] loop compilation problem

2017-08-24 Thread Lukas Stadler
Hi! We’ve seen a problem with the compiler in specific cases of matrix updates: > { m <- matrix(1:4, 2) ; z <- 0; for(i in 1) { m[z <- z + 1,z <- z + 1] <- 99; > } ; m } [,1] [,2] [1,]13 [2,]2 99 Here, it modifies element [2,2], which is unexpected. It behaves correct without

Re: [Rd] loop compilation problem

2017-08-24 Thread luke-tierney
Thanks. Here is a simplified version: library(compiler) zero <- 0 one <- 1 expr <- quote((z <- zero + one) + (z <- z + 1)) eval(compiler::compile(expr)) Sill fix shortly. Best, luke On Thu, 24 Aug 2017, Lukas Stadler wrote: Hi! We’ve seen a problem with the compiler in specific cases of m

[Rd] Bug in tools::toTitleCase

2017-08-24 Thread Carl Ganz
Hello, I believe there is a bug in tools::toTitleCase, because it converts NAs into the string "NA". tools::toTitleCase(NA_character_) The issue appears to be with the C function splitString since this also returns "NA": .Call('C_splitString', NA_character_, " -/\"()\n", PACKAGE = "tools") Kin