[R] Histogram
John Kane
jrkrideau at yahoo.ca
Tue Jun 19 19:28:57 CEST 2007
Your subsetting expression in lines does not make any
sense at all.
Not tested but maybe something like:
lines (density(subset(x, x> 0.05 & x< -0.05)bw=SJ),
col='red")
--- livia <yn19832 at msn.com> wrote:
> Hello, I am using the following codes to plot a
> histogram and density line
> for x. For the density line, I just want it to show
> the two tails, eg, for x
> larger than 0.05 ans smaller than -0.05
>
> hist (x, seq(-0.1,0.1,0.01),freq = FALSE)
> lines (density(x,bw="SJ"), x> 0.05 & x< (-0.05), col
> = "red")
>
> But is does not work, can anyone give me some
> advice?
>
>
>
> --
> View this message in context:
>
http://www.nabble.com/Histogram-tf3947281.html#a11197644
> Sent from the R help mailing list archive at
> Nabble.com.
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
More information about the R-help
mailing list