Description Usage Arguments Value Author(s) References Examples
View source: R/draw_waterfall.R
Create a ggplot2 object with a waterfall plot from a maeve study.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | draw_waterfall(
data_frame,
bar = c("both", "max", "min", "extreme", "last"),
ordering = c("extreme", "max", "min", "last"),
facet_char = c("none", "group_name"),
scales_char = c("free_x", "fixed", "free_y", "free"),
vertical_x_label = TRUE,
return_list = FALSE,
group_name = maeve_options("group_name"),
subject_ID = maeve_options("subject_ID"),
x_name = maeve_options("x_name"),
endpoint_name = maeve_options("endpoint_name"),
nrow_value = maeve_options("nrow_value"),
ncol_value = maeve_options("ncol_value"),
axis_text_x_size = maeve_options("axis_text_x_size"),
axis_text_x_angle = maeve_options("axis_text_x_angle"),
axis_text_x_hjust = maeve_options("axis_text_x_hjust"),
axis_text_x_vjust = maeve_options("axis_text_x_vjust"),
axis_text_y_size = maeve_options("axis_text_y_size"),
strip_text_size = maeve_options("strip_text_size"),
legend_text_size = maeve_options("legend_text_size"),
legend_position_char = maeve_options("legend_position_char"),
title_label = maeve_options("title_label"),
x_label = maeve_options("x_label"),
y_label = maeve_options("y_label"),
geom_na_rm = maeve_options("geom_na_rm")
)
|
data_frame |
data frame with factors for group and ID, numerics for time on study and response. |
bar |
character vector with description of how to determine bar range for each subject_ID. |
ordering |
character vector with description of how to order the bars from left to right (within panel, if facet_char != 'none') |
facet_char |
character vector with description of how to facet: "facet_wrap( ~ facet_char, ...)" |
scales_char |
character vector with description of how to set x- and y-axes within facets. |
vertical_x_label |
logical whether to rotate the x-axis labels by default. Usually desirable behavior in the waterfall plot. |
return_list |
logical whether to return multiple results in a list. If FALSE (default), just a ggplot is returned. |
group_name |
character. See ?maeve_options(). |
subject_ID |
character. See ?maeve_options(). |
x_name |
character. See ?maeve_options(). |
endpoint_name |
character. See ?maeve_options(). |
nrow_value |
numeric. See ?maeve_options(). |
ncol_value |
numeric. See ?maeve_options(). |
axis_text_x_size |
numeric. See ?maeve_options(). |
axis_text_x_angle |
numeric. See ?maeve_options(). |
axis_text_x_hjust |
numeric. See ?maeve_options(). |
axis_text_x_vjust |
numeric. See ?maeve_options(). |
axis_text_y_size |
numeric. See ?maeve_options(). |
strip_text_size |
numeric. See ?maeve_options(). |
legend_text_size |
numeric. See ?maeve_options(). |
legend_position_char |
character. See ?maeve_options(). |
title_label |
character. See ?maeve_options(). |
x_label |
character. See ?maeve_options(). |
y_label |
character. See ?maeve_options(). |
geom_na_rm |
logical. See ?maeve_options(). |
A ggplot2 object
Bill Forrest <forrest@gene.com>
Bill Forrest forrest@gene.com
1 2 3 4 5 6 7 8 9 | cat('Example for draw_waterfall() in dontrun code block.')
## Not run:
data( vismodegib )
vismo21 <- dplyr::filter( vismodegib, DAY_OF_STUDY <= 21 )
vismo21 <- dplyr::mutate( vismo21, y = log( 1 + TUMOR_VOLUME ) ) # add log-scale endpoint.
figure_waterfall <- draw_waterfall( vismo21, endpoint_name = 'y', facet_char = 'group_name',
ncol_value = 5 )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.