ggCD.plot: Conditional density plot with ggplot2

Description Usage Arguments Author(s) See Also Examples

View source: R/ggCD.plot.R

Description

Computes and plots conditional densities describing how the conditional distribution of a categorical variable y changes over a numerical variable x.

Usage

1
2
3
ggCD.plot(formula, data, ...)
## Default S3 method:
ggCD.plot(formula, data, add.label = TRUE, ylevs = 2:1, text.col = "black")

Arguments

formula

a "formula" of type y ~ x with a single dependent "factor" and a single numerical explanatory variable.

data

a data frame

add.label

logical. Should the levels of the response variable be added to the plot?

ylevs

numeric. The order of the levels of the response.

text.col

the color of the label text.

Author(s)

Jason Grafmiller

See Also

See Also ggplot2, cdplot.

Examples

1
2
3
4
data(brown_genitives)

## plot the percentages of s- vs. of-genitives (Type) by possessor word length
ggCD.plot(Type ~ PossrWordC, brown_genitives)

jasongraf1/JGggplot documentation built on May 29, 2019, 11:43 a.m.