[R] Example using Rdqags

Liaw, Andy andy_liaw at merck.com
Fri Jul 9 19:21:35 CEST 2004


This is not a direct answer to your question, but if all you want to do is
integrate a function numerically, you don't need to be doing it through R.
You should be able to find codes that you can use directly, such as quadpack
or even GSL.  You may want to search on GAMS (Guide to Available
Mathematical Software, http://gams.nist.gov/).

Andy

> From: Victoria Landsman
> 
> Dear all, 
> I'd like to use the Rmath library for calling R functions in 
> C code. I have no any experience in this. I am trying to read 
> the "Writing  R extensions" manual but with no success. I 
> searched the Web and archives but did not find appropriate 
> example. To be specific, I am looking for an example of the 
> .c file and .R file aimed to compute the integral of f(x)=x^2 
> from 0 to 1 using Rdqags?
> 
> I am running R 1.9.1 on Sun.
> Much thanks for any comments/help. 
> Vicky.




More information about the R-help mailing list