qacBase (version 1.0.3)

densities: Density plots

Description

Create desnsity plots for all quantitative variables in a data frame.

Usage

densities(data, fill = "deepskyblue2", adjust = 1)

Arguments

data

data frame

fill

fill color for density plots

adjust

a factor multiplied by the smoothing bandwidth. See details.

Value

a ggplot graph

Details

The densities function will only plot quantitative variables from a data frame. Categorical variables are ignored.

The adjust parameter mulitplies the smoothing parameter. For example adjust = 2 will make the density plots twice as smooth. The adjust = 1/2 will make the density plots half as smooth (i.e., twice as spiky).

Examples

Run this code
# NOT RUN {
densities(cars74)

densities(cars74, adjust=2)

densities(cars74, adjust=1/2)
# }

Run the code above in your browser using DataLab