Skip to content
Back to formatted view

Raw Message

Message-ID: <1D9ECF0256E97647B60E825DA1AFE6B025F3F2DF@SXMB1PF.SYSTEMS.SMU.EDU>
Date: 2011-04-25T16:03:59Z
From: Bao, Wenkai
Subject: R equivalent to (D)QDAWO in Fortran?

Hi useRs,

I have a set of fortran code that was passed down from previous students, and I am converting its algorithm into R codes.

I encounter this function in Fortran (D)QDAWO, which numerically integrates a function f with a user-specified cosine or sine weight. It is used because the original function that I want to integrate is f(x)*cos(x).

I tried in R to directly integrate by integrate(g(x)), where g(x)=f(x)*cos(x), but a lot of error messages and warnings were given. So is there some function in R that is equivalent to this QDAWO in Fortran, to specifically integrate a function with a sine or cosine component?

Thank you very much!