d <- density(rnorm(1000))
plot(d)
d$x[which.max(d$y)]
abline(v=d$x[which.max(d$y)])
http://r.789695.n4.nabble.com/Find-x-value-of-density-plots-td4165926.html
plot(d)
d$x[which.max(d$y)]
abline(v=d$x[which.max(d$y)])
http://r.789695.n4.nabble.com/Find-x-value-of-density-plots-td4165926.html
No comments:
Post a Comment