Learn R Programming

ggdistribute (version 1.0.3)

posterior_plot: Print a small example plot with geom_posterior

Description

Print a small example plot with geom_posterior

Usage

posterior_plot(data, x, y = "..count..", ...)

Arguments

data

A dataset to use, called at the top layer within ggplot.

x

A character string of the x axis variable name (e.g., values making up the distribution).

y

A grouping variable for generating groups of distributions. Defaults to ..count.. for no groups and displays the density as counts of the number of samples for the value of x.

...

Additional arguments passed to geom_posterior().

Value

Object of class gg, ggplot.

Examples

Run this code
# NOT RUN {
# Generate a basic example plot if no data is specified.
posterior_plot()
# }

Run the code above in your browser using DataLab