Skip to contents

Plotting summarized data frames generated by count_data().

Usage

plot_count(data, x_var, fill_var = NULL, facet_var = NULL, exclude_na = FALSE)

Arguments

data

Input data.frame (function is designed to work with data generated from count_data()).

x_var

Single character value indicating which variable is displayed on the x axis.

fill_var

Single character value indicating which variable is used to fill the plot (fill argument in ggplot()). Default is NULL.

facet_var

Single character value indicating which variable is used to facet the plot (via facet_wrap()) . Default is NULL.

exclude_na

logical value indicating whether to exclude NAs in the plot (checks all variables indicated via other parameters). Default is FALSE.

Value

A ggplot object.