[R] optimize

2014-10-01 Thread Nick gayeski
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

[R] Histograms with bin proportions on the y-axis

2012-05-20 Thread Nick Gayeski
I have what is probably a simple problem. I have a data file from an MCMC Bayes estimation problem that is a vector of 500,000 numeric values (just one variable) ranging from 100,000 to 700,000. I need to display the histogram of this data in a high quality graphic for a figure in a journal publica