Posts Tagged ‘ integrate ’

Vectorize!

February 20, 2011
By
Vectorize!

Here is an email sent by one of my students a few days ago: Do you know how to integrate a function with an  “if”? For instance: __X=rnorm(100) __Femp=function(x){ +   return(sum(Xintegrate(Femp,0,1)$value does not work. My reply was that the fundamental reason it does not work is that integrate (or curve for instance)

Read more »

More typos in Chapter 5

December 29, 2010
By
More typos in Chapter 5

Following Ashley’s latest comments on Chapter 5 of Introducing Monte Carlo Methods with R, I realised Example 5.5 was totally off-the-mark! Not only the representation of the likelihood should have used prod instead of mean, not only the constant should call the val argument of integrate, not only integrate  uses lower and upper rather than

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)