create.boxplot: Create a boxplot

Description Usage Arguments Value Author(s) See Also Examples

View source: R/create.boxplot.R

Description

Create a barplot from a dataframe.

Usage

1
create.boxplot(data = NULL, x = NULL, y, xlab = NULL, ylab = NULL, theme = NULL, filename = NULL, resolution = 1600)

Arguments

data

Data frame containing data to plot (required)

x

The data column inside the dataframe to plot on the x-axis. The data should be a factor (required)

y

The data column inside the dataframe to plot on the y-axis

xlab

Label for the x-axis

ylab

Label for the y-axis

theme

Theme gpplot function

filename

filename to write plot to

resolution

resolution for the plot

Value

Returns the ggplot2 object if no filename is passed, otherwise returns the exit code for the creation of the plot.

Author(s)

Richard de Borja <richard.deborja@sickkids.ca>

See Also

write.plot

Examples

1
2
3
# create a simple boxplot from the mtcars dataset
mtcars$cyl <- factor(mtcars$cyl)
create.boxplot(data = mtcars, x = 'cyl', y = 'mpg', xlab = 'Number of Cylinders', ylab = 'Miles per Gallon')

rdeborja/plotting.general documentation built on May 27, 2019, 3:05 a.m.