Emma,

One way is to use lattice:

test <- data.frame(y = rnorm(5 * 50),
   groupings = rep(letters[1:5], 50))
   
library(lattice)

densityplot( ~ y, group = groupings, data =test)

HTH,

Max
   
   
>emma hartnett emma_hartnett at yahoo.co.uk
>Wed Sep 21 17:57:44 CEST 2005
>
>    * Previous message: [R] Problem with SAGx Library
>    * Next message: [R] factor as seq() in for loop
>    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
>I want to overlay 50 denisty plots on a single plot. 
>For each plot there are 10,000 data points and i want
>the empirical density of the data. I have not been
>able to find an easy way to achieve this (I have
>scoured the manula and website so sorry if I missed
>it!), does anyone have any suggestions?
>
>Thankyou.


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to