ggboxplot: Make a boxplot using ggplot2

Description Usage Arguments Value Author(s)

Description

This is a encapsulated function to make a boxplot using the ggplot2 package. When parsing a cross-over study or repeated measure data, lines can be drawn between the 2 points belong to the same entity in different timepoints.

Usage

1
2
3
4
ggboxplot(data, x, y, cols, rows, line, color, show.points = TRUE,
  jitter = 0, box.size = 0.5, whisker.size = 0.5,
  whisker.width = 0.5, point.size = 3, point.alpha = 0.5,
  point.color = "black", color.pal = NULL, show.legend = TRUE)

Arguments

data

A data.frame containing all the variables needed to draw the box plot.

x

A character string indicating the x axis variable.

y

A character string indicating the y axis variable.

cols

A character string indicating the variable defines faceting groups on columns.

rows

A character string indicating the variable defines faceting groups on rows.

line

A character string indicating the variable used to draw lines between points.

color

A character string indicating the variable defines the color of lines or points.

show.points

Logic value indicates whether to show points.

jitter

Numeric value defines the amount of horizontal jitter.

box.size

Numeric value defines the size of the box.

whisker.size

Numeric value defines the size of whisker.

whisker.width

Numeric value defines the width of boxplot

point.size

Numeric value defines the size of points.

point.alpha

Numeric value defines the transparency.

point.color

Character value defines the color of points when the argument 'color' is not specified.

color.pal

Character vector defines the color panel to use.

show.legend

Logic value defines whether to show legend.

Value

A ggplot object

Author(s)

Chenghao Zhu


zhuchcn/ggmetaplots documentation built on May 12, 2019, 10:53 a.m.