View source: R/plot_waterfall.R
plot_waterfall | R Documentation |
Intended to aid in selection of significant features by displaying the hazard ratios for each feature ( ordered by hazard ratio ) with optional color coding for various Q-Value significance levels
plot_waterfall(
plot_df,
colors_clm = NA,
features_clm = "Independant",
fill_scheme = scale_fill_viridis_d(option = "rocket", begin = 0.8, end = 0.3),
gg_add_on = theme_minimal(),
hr_clm = "Hazard_Ratio",
lab_color = "Q-Value",
lab_x = "Features",
lab_y = "Hazard Ratio ( Log10 )",
log10_scale = TRUE,
output_path = NA,
plot_title = title_prefix,
sig_clm = "qValue",
sig_threshold = NA,
size_height = 5.5,
size_width = 5
)
plot_df |
Dataframe containing at a minimum hazard ratios and features |
colors_clm |
column name in plot_df of categorical variable to use for coloring of bars ( typically representing significance levels ) |
features_clm |
column name in plot_df corresponding to features |
fill_scheme |
ggplot function to specify discrete fills |
gg_add_on |
ggplot elements to add on to plot. Defaults to |
hr_clm |
column name in plot_df corresponding to hazard ratios |
lab_color |
String for labeling color legend |
lab_x |
String for labeling x axis |
lab_y |
String for labeling y axis |
log10_scale |
Boolean to indicate whether or not the y axis will be shown on log10 scale. |
output_path |
Output path for plot |
plot_title |
String for plot title |
sig_clm |
column name in plot_df corresponding to q-values, only used if sig_threshold is also set |
sig_threshold |
double representing the maximum q-value to plot on the graph. Observations with higher qvalues will be dropped from the data |
size_height |
Numeric to specify plot height |
size_width |
Numeric to specify plot width |
Returns ggplot object with graphed line and vertical lines at significance intervals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.