ggdensityplot: Plot a density

Description Usage Arguments Value Examples

View source: R/ggdensityplot.R

Description

Plot a density

Usage

1
ggdensityplot(data, variable, plot_type = "histogram", ...)

Arguments

data

A data frame

variable

Name of the variable to plot

plot_type

One of "histogram", "density", "boxplot" or "violin"

...

Extra parameters to be passed to either one of gghistogram, ggdensity, ggboxplot or ggviolin

Value

A ggplot

Examples

1
2
ggdensityplot(mtcars, "mpg", mapping = list(fill = "vs"), alpha = 0.5)
ggdensityplot(mtcars, "mpg", x = "cyl", plot_type = "boxplot")

rscherrer/ggsim documentation built on June 11, 2020, 2:22 p.m.