View source: R/VBE_safe_space_plot.R
VBE_safe_space_plot | R Documentation |
VBE_safe_space_plot
makes dissolution safe-space plots
comparing predicted dissolution values to observed and includes shading to
indicate the safe space for bioequivalence.
VBE_safe_space_plot(
VBE_dataframe,
color_set = NA,
safe_space_color = NA,
safe_space_trans = NA,
linetypes = NA,
linewidths = NA,
point_shapes = NA,
point_sizes = NA,
save_graph = NA,
fig_height = NA,
fig_width = NA
)
VBE_dataframe |
a data.frame of virtual bioequivalence dissolution data with the following columns:
For an example, please view the object "VBE_disso_example" and set up your data like that. |
color_set |
the set of colors to use. Options:
|
safe_space_color |
color to use for indicating the safe space; any color that's acceptable in R will be acceptable here. |
safe_space_trans |
transparency to use for the safe space from 0 (fully transparent, i.e., invisible) to 1 (fully opaque) |
linetypes |
the line type(s) to use for the graph. Possible options can
be seen by typing |
linewidths |
the line widths to use (numeric) |
point_shapes |
the point shape(s) to use for the graph. Possible options
can be seen by typing |
point_sizes |
the point sizes (numeric) |
save_graph |
optionally save the output graph by supplying a file name in quotes here, e.g., "Demographics comparisons.png". Acceptable graphical file extensions are "eps", "ps", "jpeg", "jpg", "tiff", "png", "bmp", or "svg". Do not include any slashes, dollar signs, or periods in the file name. Leaving this as NA means the file will not be saved to disk. |
fig_height |
figure height in inches; default is 6 |
fig_width |
figure width in inches; default is 8 |
a ggplot2 graph
# Using example data included in the package
VBE_safe_space_plot(VBE_dataframe = VBE_disso_example)
# Setting some colors for actual and hypothetical datasets
MyColors_actual <- reds(4)
names(MyColors_actual) <- c("Formulation A",
"Formulation B",
"Formulation C",
"Formulation D")
MyColors_hyp <- blues(6)
names(MyColors_hyp) <- paste("Test", 1:6)
MyColors <- c(MyColors_actual, MyColors_hyp)
VBE_safe_space_plot(VBE_dataframe = VBE_disso_example,
color_set = MyColors,
safe_space_color = "gray80",
linetypes = c("solid", "longdash"),
save_graph = "VBE safe space.png",
fig_height = 4, fig_width = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.