oops. . . . Turning it into a void function fixed the problem!
Thanks.
Jeremy
Thomas Lumley wrote:
>
> I don't get the error, but I assume it's because your C function
> returns a double and .C() assumes it is a void function.
>
> -thomas
>
>
> On Mon, 19 Jan 2009, Jeremy Silver wrote:
>
>
On Mon, 2009-01-19 at 09:54 +0100, Jeremy Silver wrote:
> Dear R experts,
(...)
> > pchisq(5.464342,1,lower.tail = FALSE)
>
> [1] 0.01940836
>
> > reproduceError(5.464342)
>
> stat = 5.464342, p = 0.019408
>
> > pchisq(5.464342,1,lower.tail = FALSE)
>
> [1] NaN
>
> Warning messages:
>
> 1: I
I don't get the error, but I assume it's because your C function returns a
double and .C() assumes it is a void function.
-thomas
On Mon, 19 Jan 2009, Jeremy Silver wrote:
Dear R experts,
I'm trying to call 'pchisq' from within a C subroutine. The following
error is returned:
** NON
Dear R experts,
I'm trying to call 'pchisq' from within a C subroutine. The following
error is returned:
** NON-convergence in pgamma()'s pd_lower_cf() f= nan.
This error message is not printed the first time I call 'pchisq' from
the C subroutine, but the second time or the next time I call '
4 matches
Mail list logo