plot.univar_category: Visualize Information for an "univar_category" Object

Description Usage Arguments See Also Examples

Description

Visualize mosaics plot by attribute of univar_category class.

Usage

1
2
## S3 method for class 'univar_category'
plot(x, na.rm = TRUE, prompt = FALSE, typographic = TRUE, ...)

Arguments

x

an object of class "univar_category", usually, a result of a call to univar_category().

prompt

logical. The default value is FALSE. If there are multiple visualizations to be output, if this argument value is TRUE, a prompt is output each time.

na.rm

logical. Specifies whether to include NA when plotting bar plot. The default is FALSE, so plot NA.

typographic

logical. Whether to apply focuses on typographic elements to ggplot2 visualization. The default is TRUE. if TRUE provides a base theme that focuses on typographic elements using hrbrthemes package.

...

arguments to be passed to methods, such as graphical parameters (see par). However, it does not support all parameters.

See Also

univar_category, print.univar_category, summary.univar_category.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(dplyr)

# Calculates the all categorical variables
all_var <- univar_category(heartfailure)

# Print univar_category class object
all_var

smoking <- univar_category(heartfailure, smoking)

# Print univar_category class object
smoking

# plot all variables
plot(all_var)

# plot smoking
plot(smoking)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.