[R] how to realize integration in C?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Nov 17 08:07:37 CET 2006
On Thu, 16 Nov 2006, Lynette Sun wrote:
> Hi,
>
> Thank you for your suggestions. But I also realized I didn't make myself
> clear. I actually don't just need the integration results in R. The
> integration in C is part of my C codes. I need the integration results in C.
> How to realize that? Any suggestions? Thanks a lot!
That is exactly what the R API routines give you: C functions to do
integration in C. Please do read the manual I mentioned, sectiom 6.9 in
the version I looked at.
>
> Best,
> Lynette
>
> ----- Original Message ----- From: "Lynette Sun" <fuyaonv at hotmail.com>
> To: "r-help" <r-help at stat.math.ethz.ch>
> Sent: Thursday, November 16, 2006 2:41 PM
> Subject: [R] how to realize integration in C?
>
>
>> Hi, all,
>>
>> In order to save simulation time, I need to call C in R. For the C codes, I
>> need integrate certain functions ( both continous and discrete ), I wonder
>> how to realize the integration in C?
>>
>> I try to use qsimp and trapzd subroutines from Numerical Recipes. But the
>> error continues to appear:" Too many steps in routine qsimp ". Anyone has
>> any idea why this happens and are there better solutions for the
>> integration
>> realization? Thanks a lot!
>>
>> Best,
>> Lynette Sun
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list