Re: [R] Find x value of density plots

2011-12-08 Thread Pavan G
Vielen Dank! On Tue, Dec 6, 2011 at 1:48 PM, Duncan Murdoch wrote: > 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)]) >

Re: [R] Find x value of density plots

2011-12-06 Thread Duncan Murdoch
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 __ R-help@r-project.org mailing

Re: [R] Find x value of density plots

2011-12-06 Thread Bert Gunter
?density ... and pay attention to the "Value" details. -- Bert On Tue, Dec 6, 2011 at 10:42 AM, Pavan G 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] Find x value of density plots

2011-12-06 Thread Pavan G
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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re