Re: [R] kernel density to smooth plots

2010-05-10 Thread Dennis Murphy
Hi: Perhaps this will do; the data were read into a data.frame object named xx. # Melt the data - constructs a factor 'variable' whose levels are the variable names # and a numeric variable named 'value' containing, oddly enough, the numeric values. # Requires package reshape. library(reshape) l

[R] kernel density to smooth plots

2010-05-10 Thread Roslina Zakaria
Hi r-sers, I have a data of relative frequencies for the interval of 0-20, 20-40,...380-400.  I would like the two data on the same graph using the same x-axis label.  My question is how to get a smooth curve using kernel density code if it possible for this data.   > cbind(rel_obs,rel_gen)