[R] Help with Integration Output

ChrisQ chrisq2005 at hotmail.co.uk
Sat Sep 24 15:28:19 CEST 2011


I need to do a calculation in R which involves adding the estimate of a
numerical integration with another number - however, if I add the number to
the output of the intergrate function (which when run on its own provides me
with a number with error), I get the message 'non-numeric argument to binary
operator'. How would I be able to avoid this and use the estimate?

eg: I have the code integrate(dnorm, -1.96, 1.96), which gives the output
0.9500042 with absolute error < 1.0e-11, but if I put in integrate(dnorm,
-1.96, 1.96)+1, I don't get 1.9500042 - how would I?

Thanks very much, Chris.

View this message in context: http://r.789695.n4.nabble.com/Help-with-Integration-Output-tp3839360p3839360.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list