ldensity | R Documentation |
Internal function only, not meant for general use Simple wrapper around ggplot2 functionaly to create density plots, potentially for many variables and coloured by group.
ldensity(data, melt = FALSE, x, facet, g, hist = FALSE)
data |
A dataset (or melt()ed dataset) |
melt |
Logical whether to melt() dataset |
x |
name of variable for density |
facet |
A variable to use for facetting |
g |
A variable to use for grouping/colouring. If |
hist |
Logical whether to make a density plot or histogram (if TRUE). |
A ggplot2 graph.
# simple facetted plot pscore:::ldensity(mtcars, TRUE) # simple coloured plot pscore:::ldensity(mtcars, x = "mpg", g = "cyl")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.