save_plot: Utility function for saving a plotlist of ggplot objects

save_plotR Documentation

Utility function for saving a plotlist of ggplot objects

Description

This utility function saves individual plots of a plotlist of ggplot objects using ggplot2 function ggsave.

Usage

save_plot(plotlist, sub_dir = "plot", scale = 1, px = 80, py = 80)

Arguments

plotlist

A list of length k containing ggplot objects of power plots.

sub_dir

Sub directory to save plot to. sub_dir is added by default to current working directory.

scale

Multiplicative scaling factor used in ggplot. Default = 1.

px

Plot size in "mm". Default = 80 mm.

py

Plot size in "mm". Default = 80 mm.

Value

A list of results.

call

The matched call.

References

none

See Also

MCboot, MCplot and MCplot_crit

Examples

## Not run: 
#

res <- MCplot_simdata_ext(npers = c(10,20, 30, 50), k=14, nstats = "sqs", xlim = 4, tcolor = TRUE)

res <- save_plot(plotlist = res$plotlist, sub_dir = "plot_k=14")


## End(Not run)

akurz1/tclboot documentation built on Oct. 23, 2022, 9:07 p.m.