[R] Add lines to density plot

From: xpRt.wannabe <xprt.wannabe_at_gmail.com>
Date: Sat 17 Sep 2005 - 01:11:05 EST

Dear List,

I am using R to learn bootstrapping concepts. Not to be oblivious to the
contributed packages of boot and bootstrap, I have opted to do the following as a way to hone my R skills.

One example I am trying to work through is the following:

x <- 1:20
Observed <- sample(x,20)
Resamples <- replicate(1000,sample(Observed,replace=TRUE)) Boot.Means <- apply(Resamples,2,mean)

For the life of me, I can't seem to figure out how to add two lines to the
density plot:

  1. A line that represents the mean of Boot.Means
  2. A line that represents the mean of Observed

Any help/pointer would be greatly appreciated. I have tried lines() but to
no avail.

        [[alternative HTML version deleted]]

R-help@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 Received on Wed Sep 21 02:22:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:14 EST