Learn R Programming

DataExplorer (version 0.5.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, title = NULL, ...)

Arguments

data

input data to be plotted, in either data.frame or data.table format.

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.

title

plot title

other arguments to be passed to geom_boxplot.

See Also

geom_boxplot

Examples

Run this code
# NOT RUN {
# plot iris dataset by "Species" (discrete)
plot_boxplot(iris, by = "Species")

# plot mtcars dataset by "mpg" (continuous)
plot_boxplot(mtcars, "mpg")
# }

Run the code above in your browser using DataLab