plot_metabolic: Plot results

View source: R/plot.R

plot_metabolicR Documentation

Plot results

Description

Plot results from the perform_meta() and perform_bind() function. Please, see 'Details' and 'Examples'.

Usage

plot_metabolic(x, save = FALSE, path, format = ".png")

Arguments

x

an object obtained from the meta-analysis results. See 'Details'.

save

A boolean to indicate whether to save the plot to disk.

path

Path to write to. It has to be a character string indicating the path and file name (without the extension). For example, ⁠~/Documents/metabolic_gofer_page_1⁠ will save metabolic_gofer_page_1.png to the Documents folder.

format

The file extension that you want to save the plot to. Only .png, is supported.

Details

This function can be used to plot the results derived from both perform_meta() and perform_bind(). It can produce forests and bubble plots, depending on the object passed to the function.

Value

a plot.

Examples

if(interactive()) {
# Perform meta-analysis on VO2max
results <- perform_meta(endpoint = "VO2max")

# Plot Overall meta-analysis results
results$meta_analysis$Overall %>%
   plot_metabolic()

# Plot Age meta-regression results
results$meta_regression$Age %>%
   plot_metabolic()

# Plot overview of Overall and Subgroups meta-analysis results
results_bind <- perform_bind(results$meta_analysis)
results_bind %>%
   plot_metabolic()

# Plot sensitivity analysis results
results$sensitivity_analysis$Overall %>%
   plot_metabolic()
}

metabolic documentation built on Oct. 10, 2023, 9:06 a.m.