Re: [Rd] Numerical stability in chisq.test

2017-12-28 Thread Kurt Hornik
> Jan Motl writes: > The chisq.test on line 57 contains following code: > STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE)) The preceding 2 lines seem relevant: ## Sorting before summing may look strange, but seems to be ## a sensible way to deal with round

Re: [Rd] Numerical stability in chisq.test

2017-12-28 Thread peter dalgaard
> On 28 Dec 2017, at 13:08 , Kurt Hornik wrote: > >> Jan Motl writes: > >> The chisq.test on line 57 contains following code: >> STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE)) > > The preceding 2 lines seem relevant: > >## Sorting before summing may look strange,

Re: [Rd] Rscript failing with h5 reveals bugs in h5 (and 'R CMD check')

2017-12-28 Thread Martin Maechler
> Duncan Murdoch > on Wed, 27 Dec 2017 06:13:12 -0500 writes: > On 26/12/2017 9:40 AM, Dirk Eddelbuettel wrote: >> >> On 26 December 2017 at 22:14, Sun Yijiang wrote: | Thanks >> for the solution. Now I know the work-arounds, but still >> don't | quite get it. Wh