[R] Ask about drawing kernel density estimation

2010-01-21 Thread Yi Du
Hi, I have a data set about age from 2006 to 2009 for certain individual. I would like to draw the kernel density estimation to age for each year. But I don't know how to draw the different plots in one graph. The data looks like: YearID Age 20061 20 20062 30 2007

Re: [R] Ask about drawing kernel density estimation

2010-01-21 Thread Dennis Murphy
Hi: Perhaps this is what you were looking for: densityplot(Age ~ Year, data = ages, group = ID, plot.points = FALSE) HTH, Dennis On Thu, Jan 21, 2010 at 7:30 AM, Yi Du abraham...@gmail.com wrote: Hi, I have a data set about age from 2006 to 2009 for certain individual. I would like to