bar_dunnett: Graph: Barplot for Dunnett test

View source: R/bar_dunnett.R

bar_dunnettR Documentation

Graph: Barplot for Dunnett test

Description

The function performs the construction of a column chart of Dunnett's test.

Usage

bar_dunnett(
  output.dunnett,
  ylab = "Response",
  xlab = "",
  fill = c("#F8766D", "#00BFC4"),
  sup = NA,
  add.mean = TRUE,
  round = 2
)

Arguments

output.dunnett

Numerical or complex vector with treatments

ylab

Variable response name (Accepts the expression() function)

xlab

Treatments name (Accepts the expression() function)

fill

Fill column. Use vector with two elements c(control, different treatment)

sup

Number of units above the standard deviation or average bar on the graph

add.mean

Plot the average value on the graph (default is TRUE)

round

Number of cells

Value

Returns a column chart of Dunnett's test. The colors indicate difference from the control.

Examples


#====================================================
# randomized block design in factorial double
#====================================================
library(AgroR)
data(cloro)
attach(cloro)
respAd=c(268, 322, 275, 350, 320)
a=FAT2DBC.ad(f1, f2, bloco, resp, respAd,
             ylab="Number of nodules",
             legend = "Stages",mcomp="sk")
data=rbind(data.frame(trat=paste(f1,f2,sep = ""),bloco=bloco,resp=resp),
           data.frame(trat=c("Test","Test","Test","Test","Test"),
                      bloco=unique(bloco),resp=respAd))
a= with(data,dunnett(trat = trat,
                  resp = resp,
                  control = "Test",
                  block=bloco,model = "DBC"))
 bar_dunnett(a)

AgroR documentation built on May 29, 2024, 4:18 a.m.