An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111206/e1b44a0d/attachment.pl>
Find x value of density plots
4 messages · Pavan G, Bert Gunter, Duncan Murdoch
?density ... and pay attention to the "Value" details. -- Bert
On Tue, Dec 6, 2011 at 10:42 AM, Pavan G <pavan.namd at gmail.com> wrote:
Hello All, How do I find the x value at max density for say, this plot plot(density(rnorm(1000))) Thank you, P ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at 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.
Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
On 06/12/2011 1:42 PM, Pavan G wrote:
Hello All, How do I find the x value at max density for say, this plot plot(density(rnorm(1000)))
d <- density(rnorm(1000)) plot(d) abline(v=d$x[which.max(d$y)]) Duncan Murdoch
2 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111208/53549505/attachment.pl>