stattable: Produce a two-way summary table of results

View source: R/stattable.R

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

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))

stats4sd/GGEBiplots documentation built on March 18, 2023, 7:54 p.m.