Description Usage Arguments Value Author(s) Examples
Function to create boxplots of a metric variable, grouped by two nominal variables
1 2 3 |
data |
A data frame with group variables and a column with numeric values. (Required) |
group_by1 |
First grouping variable for which the plot will be facetted by. (Required) |
group_by2 |
Second grouping variable which defines the subgroup of group1 (Required) |
col.jitter_by |
The variable name by which the jitter points will be colored by. (Default: NULL) |
shape_jitter_by |
The variable name by which the jitter points will be shaped by. (Default: NULL) |
title |
The title of the plot (Default: NULL) |
xlab |
The x-axis label (Default: NULL) |
ylab |
The y-axis label (Default: NULL) |
legend |
Flag indicating whether the legend should be displayed (Default: FALSE) |
rotate |
Flag indicating whether the x-axis labels should be rotated by 45° (Default: FALSE) |
A ggplot figure
Jens Hooge
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
require(reshape2)
n <- 500
df <- data.frame(A=sample(c("a1", "a2", "a3"), n, replace=TRUE),
B=sample(c("b1", "b2"), n, replace=TRUE),
C=sample(c("c1", "c2", "c3"), n, replace=TRUE),
D=sample(c("d1", "d2", "d3"), n, replace=TRUE),
value=rnorm(n, 100, 1))
general.box_plot_facetted(df, group_by1 = "A", group_by2 = "B",
col.jitter_by = "A", shape_jitter_by = "C",
rotate=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.