densityPlot
contructs and graphs nonparametric density estimates, possibly conditioned on a factor.
It is a wrapper for the standard RdensityPlot(x, ...)
## S3 method for class 'default':
densityPlot(x, g, bw = "SJ", adjust=1,
kernel = c("gaussian", "epanechnikov", "rectangular",
"triangular", "biweight", "cosine", "optcosine"),
xlab = deparse(substitute(x)), ylab = "Density", col = palette(),
lty = seq_along(col), lwd = 2, grid=TRUE,
legend.location = "topright", legend.title = deparse(substitute(g)),
show.bw = FALSE, rug = TRUE, ...)
## S3 method for class 'formula':
densityPlot(formula, data = NULL, subset, na.action = NULL, xlab, ylab, ...)
NULL
invisibly and draw graphs.plot
density
, bw.SJ
, link{plot.density}
densityPlot(~ income, show.bw=TRUE, data=Prestige)
densityPlot(income ~ type, data=Prestige)
Run the code above in your browser using DataLab