Re: [Rd] Vectorized switch

2009-12-18 Thread tlumley
On Fri, 18 Dec 2009, Gabriel Becker wrote: My understanding is that all the really fast vectorized operations are implemented down in C code, not in R. Thus if you wanted to write a vectorized switch, which I agree would be rather nice to have, you'd need to do it down there and then write a .Ca

Re: [Rd] apparently incorrect p-values from 2-sided Kolmogorov-Smirnov (PR#14158)

2009-12-18 Thread tlumley
I've fixed this by adding 0.5/mn to q. The problem (at least in principle) with multiplying them all up is integer overflow. By the time 0.5/mn underflows to zero, missing one value in the distribution won't matter. -thomas On Fri, 18 Dec 2009, David John Allwright wrote: > Dear Tho

Re: [Rd] apparently incorrect p-values from 2-sided Kolmogorov-Smirnov test (PR#14145)

2009-12-18 Thread tlumley
I've fixed this by adding 0.5/mn to q. The problem (at least in principle) with multiplying them all up is integer overflow. By the time 0.5/mn underflows to zero, missing one value in the distribution won't matter. -thomas On Fri, 18 Dec 2009, David John Allwright wrote: Dear Thoma

Re: [Rd] apparently incorrect p-values from 2-sided Kolmogorov-Smirnov (PR#14151)

2009-12-16 Thread tlumley
On Tue, 15 Dec 2009, allwr...@maths.ox.ac.uk wrote; (in part) > > x<-1:5 > y<-c(2.5,4.5) > ks.test(x,y) > > The value of the D_2,5 statistic is calculated as 0.4 correctly, but the > p-value is stated by R as 1, though in fact it should be 20/21=0.9524 What we seem to have here is a rounding err

Re: [Rd] apparently incorrect p-values from 2-sided Kolmogorov-Smirnov test (PR#14145)

2009-12-16 Thread tlumley
On Tue, 15 Dec 2009, allwr...@maths.ox.ac.uk wrote; (in part) x<-1:5 y<-c(2.5,4.5) ks.test(x,y) The value of the D_2,5 statistic is calculated as 0.4 correctly, but the p-value is stated by R as 1, though in fact it should be 20/21=0.9524 What we seem to have here is a rounding error proble

[Rd] printCoefmat() with all-zero first column (PR#13677)

2009-04-25 Thread tlumley
> m<-matrix(c(0,1),ncol=2) > printCoefmat(m) [,1] [,2] [1,] NaN1 Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In log(c(Inf, -Inf), 10) : NaNs produced > sessionInfo() R version 2.9.0 be

Re: [Rd] actual argument matching does not conform to the definition (PR#13635)

2009-04-02 Thread tlumley
The explanation is that quote() is a primitive function and that the argument matching rules do not apply to primitives. That section of the R Language definition should say that primitives are excluded; it is documented in ?.Primitive. -thomas On Thu, 2 Apr 2009 w...@idi.ntnu.no wrot

Re: [Rd] Column name disappears when indexing a single column (PR#12534)

2008-08-13 Thread tlumley
1. This is not a bug (as you seem to realize), so it should not be sent to r-bugs. 2. You seem to want the drop=FALSE argument to [], as in FAQ 7.5 -thomas On Wed, 13 Aug 2008 [EMAIL PROTECTED] wrote: > Good Day, > I can understand that after indexing a single column in a matrix, R wi

Re: [Rd] bug in by.data.frame, R-2.6.1 (PR#10506)

2007-12-20 Thread tlumley
On Wed, 19 Dec 2007, Prof Brian Ripley wrote: > It transpires that package survey relies on the current behaviour (which is > not new in 2.6.1: R 2.0.0 did it). > > The suggested fix is reasonable if 'data' was originally a data frame, but > the default method promotes vectors to data frames, an

[Rd] non-central qt() near zero (PR#9050)

2006-06-30 Thread tlumley
curve(qt(x,df=20,ncp=3),from=0,to=0.4) curve(qt(x,df=20,ncp=3),from=0,to=0.004) shows discontinuities, the first at 0.00135. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle _

Re: [Rd] Memory allocation fails in R 2.2.1 and R 2.3.0 on SGI Irix, (PR#8862)

2006-05-15 Thread tlumley
On Mon, 15 May 2006, [EMAIL PROTECTED] wrote: > Dear R developers, > > We have a big SGI Origin computation server with 32 cpu's and 64 Gb of > RAM. In R 2.0.0 we could run large jobs, allocating 8 Gb of RAM was not > a problem, for example by running: > > v1 <- seq(1,2^29) > > v2 <- seq(1,2^29)

Re: [Rd] as.data.frame segfaults on large lists (PR#8141)

2005-09-22 Thread tlumley
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1903393524-2062424977-1127399140=:32170 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE

Re: [Rd] as.data.frame segfaults on large lists (PR#8141)

2005-09-20 Thread tlumley
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1903393524-540054921-1127222869=:28721 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE