Learn R Programming

DataExplorer (version 0.8.0)

plot_boxplot: Create boxplot for continuous features

Description

This function creates boxplot for each continuous feature based on a selected feature.

Usage

plot_boxplot(data, by, binary_as_factor = TRUE,
  geom_boxplot_args = list(), title = NULL, ggtheme = theme_gray(),
  theme_config = list(), nrow = 3L, ncol = 4L, parallel = FALSE)

Arguments

data

input data

by

feature name to be broken down by. If selecting a continuous feature, boxplot will be grouped by 5 equal ranges, otherwise, all existing categories for a discrete feature.

binary_as_factor

treat binary as categorical? Default is TRUE.

geom_boxplot_args

a list of other arguments to geom_boxplot

title

plot title

ggtheme

complete ggplot2 themes. The default is theme_gray.

theme_config

a list of configurations to be passed to theme.

nrow

number of rows per page

ncol

number of columns per page

parallel

enable parallel? Default is FALSE.

Value

invisibly return the named list of ggplot objects

See Also

geom_boxplot

Examples

Run this code
# NOT RUN {
plot_boxplot(iris, by = "Species", nrow = 2L, ncol = 2L)
plot_boxplot(iris, by = "Species", geom_boxplot_args = list("outlier.color" = "red"))
# }

Run the code above in your browser using DataLab