stattable {GGEBiplots} | R Documentation |
Produce a two-way summary table of results
Description
Transforms raw data into a simple two-way table for use in
GGEModel
with row names and column names. By design
rather than just a side-effect of combining list
with tapply
Usage
stattable(rowfactor, columnfactor, outcome, FUN = mean, ...)
Arguments
rowfactor |
variable to be included in the rows |
columnfactor |
variable to be included in the columns |
outcome |
vector containing outcome values |
FUN |
name of summary function to use |
... |
other arguments for |
Examples
simdata<-data.frame(expand.grid(Genotype=1:10,Environment=1:10,Rep=1:3),Outcome=rnorm(300))
meantab<-stattable(simdata$Genotype,simdata$Environment,simdata$Outcome,FUN=mean,na.rm=TRUE)
GGEPlot(GGEModel(meantab))
[Package GGEBiplots version 0.1.3 Index]