Page 53 of Robert and Casella's "Use R" book, Introduction to Monte Carlo Methods with R, has the following code:
optimize(f=function(x){dbeta(x,2.7,6.3)}, + interval=c(0,1) ,max=T)$objective This should return [1] 2.669744 I run R from R Studio. When I enter this code I receive the following error message: Error in f(arg, ...) : unused argument (max = TRUE) Can someone help me understand why I get this error? Thanks. NickG [[alternative HTML version deleted]] ______________________________________________ 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.