save_group_lineplots: Save line plots with errorbars by group

Description Usage Arguments See Also Examples

View source: R/effect_plots.R

Description

Plots the change in the feature abundances as a function of e.g. time. A line is drawn for each group and error bars are added. A separate plot is drawn for each feature.

Usage

1
2
3
4
save_group_lineplots(object, all_features = FALSE, file, width = 8,
  height = 6, x = time_col(object), group = group_col(object),
  fun.data = "mean_cl_boot", fun.y = NULL, fun.ymin = NULL,
  fun.ymax = NULL, position_dodge_amount = 0.2, color_scale = NULL)

Arguments

object

a MetaboSet object

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before visualization.

file

path to the PDF file where the plots should be saved

width, height

width and height of the plots in inches

x

character, name of the column to be used as x-axis

group

character, name of the column containing group information, used for coloring

fun.data

passed to ggplot2::stat_summary and used for errorbars, "A function that is given the complete data and should return a data frame with variables ymin, y, and ymax."

fun.ymin, fun.y, fun.ymax

Alternative to fun.data, passed to ggplot2::stat_summary, "supply three individual functions that are each passed a vector of x's and should return a single number"

color_scale

the color scale as returned by a ggplot function

position_dodge_amout

numeric: how much the group mean points should dodge away from each other

See Also

stat_summary

Examples

1
## Not run: save_group_lineplots(drop_qcs(merged_sample), file = "group_lineplots.pdf")

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.