stattable: Produce a two-way summary table of results

Description Usage Arguments Examples

View source: R/stattable.R

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

1
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 FUN

Examples

1
2
3
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))

Example output



GGEBiplots documentation built on Feb. 9, 2022, 5:09 p.m.