plotline2: Plot mean and error bar as line chart, for two factors, first...

Description Usage Arguments Value

View source: R/general_tools.r

Description

Plots a standard 'mean and error bar figure for levels of two factors as a line plot. Factors represented as continuous variables must be converted to an actual factor (using as.factor) before use. First factor is represented as categories on the x-axis and the second as levels in the plot legend.

Usage

1
plotline2(data, val, factor, legend, error)

Arguments

data

The dataset containing the values to be plotted.

val

The column of the dataset representing the values to be averaged.

factor

The column representing the grouping factor (categories on the x-axis.

legend

The column representing the grouping factor to be shown in the legend.

error

The type of error value to be calculated. Options are "sd", "se" or "ci". Defaults to "sd".

Value

A line plot of means and error bars for two factors.


robbriers/mytools documentation built on Dec. 12, 2020, 1:14 p.m.