[R] Superimpose exponential density function to histogram
mantino84 at libero.it
Tue May 7 15:18:08 CEST 2013
I have a large vector of durations (in seconds) and I create an histogram as
Next, I would like to superimpose the exponential distribution with the
maximum likelihood estimate of lambda. To do so, I first calculate get the
estimate of lambda and then try to add the curve in the following way (with
Error in curve(rexp(10000,rate=lambda),add=TRUE) : 'expr' must be a
function, or a call or an expression containing 'x'.
So I need to have an 'x', OK. But doing this does not work either:
What am I doing wrong?
View this message in context: http://r.789695.n4.nabble.com/Superimpose-exponential-density-function-to-histogram-tp4666468.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help