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! ______________________________________________ R-help@r-project.org 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.