On Mon, Mar 10, 2008 at 3:55 PM, Sean MacEachern <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm interested in doing a multiple density plot on a number of columns in a > dataframe. > > >DF > > lineA.1 lineA.2 lineB.1 lineB.2 > r1 5.355354 6.665575 10.288498 11.74750 > r2 3.643415 5.427600 11.407112 13.97065 > r3 5.813674 6.438502 9.628871 11.57456 > r4 5.241340 5.125049 10.456221 12.35381 > r5 4.640885 8.635518 8.344704 11.98484 > r6 4.559852 6.416171 10.419599 10.89247 > r7 4.058033 7.378469 9.043280 11.88214 > r8 3.439271 5.108395 10.197870 10.65987 > r9 5.129664 4.326907 8.851552 11.46618 > r10 4.258742 7.002541 8.716967 13.07019 > > > > I have been reading about the simple.densityplot > > However, I can't find it in R has it been replaced? > > > > >simple.densityplot(line6.1,line6.2,line7.1,line7.2, data = DF) > Error: could not find function "simple.densityplot"
You could also try: install.packages("ggplot2") library(ggplot2) qplot(value, data = melt(DF), colour=variable, geom="density") which will give you a nice legend as well. -- http://had.co.nz/ ______________________________________________ R-help@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.