Re: [Rd] Discrepancy: R sum() VS C or Fortran sum

2018-03-16 Thread Pierre Chausse
urate sum than your simple version. Best, luke On Fri, 16 Mar 2018, Pierre Chausse wrote: Hi all, I found a discrepancy between the sum() in R and either a sum done in C or Fortran for vector of just 5 elements. The difference is very small, but this is a very small part of a much larger

[Rd] Discrepancy: R sum() VS C or Fortran sum

2018-03-16 Thread Pierre Chausse
Hi all, I found a discrepancy between the sum() in R and either a sum done in C or Fortran for vector of just 5 elements. The difference is very small, but this is a very small part of a much larger numerical problem in which first and second derivatives are computed numerically. This is

Re: [Rd] Passing R code from webpage

2013-02-17 Thread Pierre Chausse
If R and ghostcript are installed on the server that hosts you webpage, it is easy. All you need is a minimum of php. I started with doR (which I think does not exist anymore) and modified it. Even better, some people offers a solution for you. Here is a GPL licenced solution.

[Rd] GPU Computing

2012-08-21 Thread Pierre Chausse
Hi all, I am looking for a function similar to mclapply() that would work with GPU cores. I have looked at all possible packages related to GPU computing but they are mainly providing functionality for big dataset or big matrices. I use mainly mclapply to speed up simulations by running

[Rd] kernapply.ts

2011-11-02 Thread Pierre Chausse
I have a suggestion for kernapply for ts objects. When we choose the option circular=F, the returned series don't have the correct dates. The removed dates are all at the beginning instead of half at the beginning and half at the end. It is particularly useful when we need to smooth the series

Re: [Rd] kernapply.ts

2011-11-02 Thread Pierre Chausse
On 02/11/11 12:20 PM, Prof Brian Ripley wrote: On Wed, 2 Nov 2011, Pierre Chausse wrote: I have a suggestion for kernapply for ts objects. When we choose the option circular=F, the returned series don't have the correct dates. The That's a matter of opinion. A kernel is applied in the same

Re: [Rd] 0.5 != integrate(dnorm,0,20000) = 0

2010-12-07 Thread Pierre Chausse
The warning about absolute error == 0 would not be sufficient because if you do integrate(dnorm, 0, 5000) 2.326323e-06 with absolute error 4.6e-06 We get reasonable absolute error and wrong answer. For very high upper bound, it seems more stable to use Inf. In that case, another .External

[Rd] stats::kernel

2010-11-30 Thread Pierre Chausse
Hi, There is a small bug in the kernel() function. Everything is fine when we use the format: kernel(name,m,r) but if we want the first argument to be a vector, which is useful is we are interested in using a method not implemented in kernel(), the default value of m is wrong. For example,