Tt.barplot: Bar chart with standard error lines using ggplot

View source: R/Ttbarplot.R

Tt.barplotR Documentation

Bar chart with standard error lines using ggplot

Description

Bar chart with standard error lines using ggplot

Usage

Tt.barplot(aov.output, T1, T2 = NULL, e.lines = "SD", dif = NULL,
  dif.h = 0.5)

Arguments

aov.output

is a data frame containing the statistics information with the following data: mean values, treatments, error lines, and if desired, letters representing statistical difference. The object stats obtained from the function Tt.aov() can be used directly.

T1

name of the column containing the treatments

T2

name of the column containing the treatments for 2-factors plot (optional)

e.lines

name of the column containing the data of the error lines to be plotted

dif

name of the column with the letters representing statistical differences

dif.h

distance from the uper error line to plot the dif letters

Value

An object for ggplot graphics

Examples

Zn <- Tt.aov(compost$Pb,compost$Treatment,compost$Plant) # 2-way anova
plot <- Tt.barplot(Zn$stats, treat2=T)
plot + labs(title="Zn in plant tissue", x='Species', y='mg/Kg')+
scale_fill_brewer(palette=3)+
guides(fill=guide_legend(title='Treatment'))

teoten108/kgv documentation built on Sept. 22, 2022, 12:54 a.m.