Tt.barplot | R Documentation |
Bar chart with standard error lines using ggplot
Tt.barplot(aov.output, T1, T2 = NULL, e.lines = "SD", dif = NULL, dif.h = 0.5)
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 |
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 |
An object for ggplot graphics
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'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.