autoplot: Automatised plot This is a wrapper function to set a plot...

autoplotR Documentation

Automatised plot This is a wrapper function to set a plot with different parameters from ggplot.

Description

Automatised plot This is a wrapper function to set a plot with different parameters from ggplot.

Usage

autoplot(
  data,
  variable,
  group,
  group_filter_vector = NULL,
  na_exclude_group = T,
  plot_type = "Boxplot",
  add_points = T,
  error_bar = "IC95",
  stat = "param"
)

Arguments

data

A dataframe with row corresponding to samples/patients and columns to variables.

variable

A character string corresponding to the studied variable.

group

A character string corresponding to the comparative groups.

group_filter_vector

A character string/vector defining groups sublevels to be included in the analysis.

na_exclude_group

Should missing values be excluded from groups?

plot_type

Set the plot type (Boxplot, Barchart_mean or Barchart_count).

add_points

Add data points as a scatter plot to the graph.

error_bar

Type of error bar to be shown on the barcharts (IC95 or hide).

stat

Type of statistics to show (param, non_param or no).


VincentAlcazer/StatAid documentation built on Aug. 27, 2024, 1:50 a.m.