Package 'GGEBiplots'

Title: GGE Biplots with 'ggplot2'
Description: Genotype plus genotype-by-environment (GGE) biplots rendered using 'ggplot2'. Provides a command line interface to all of the functionality contained within the archived package 'GGEBiplotGUI'.
Authors: Sam Dumble [aut, cre], Elisa Frutos Bernal [ctb], Purificacion Galindo Villardon [ctb]
Maintainer: Sam Dumble <[email protected]>
License: GPL-3
Version: 0.1.3
Built: 2024-11-15 03:51:07 UTC
Source: https://github.com/cran/GGEBiplots

Help Index


Compare two genotypes biplot

Description

Compare the performance of two genotypes across all environments

Usage

CompareGens(GGEModel, G1, G2, ...)

Arguments

GGEModel

An object of class GGEModel or gge

G1

genotype to compare. Must be a string which matches a genotype label

G2

genotype to compare. Must be a string which matches a genotype label and not equal to G1

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
CompareGens(GGE1,"cas","luc")

Discrimination vs. representativeness biplot

Description

Evaluating the environments based on both discriminating ability and representativeness

Usage

DiscRep(GGEModel, ...)

Arguments

GGEModel

An object of class GGEModel or gge

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
DiscRep(GGE1)

Relationship between environments

Description

Relationship between environments

Usage

EnvRelationship(GGEModel, ...)

Arguments

GGEModel

An object of class GGEModel or gge

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
EnvRelationship(GGE1)

Examine an environment

Description

Ranking the cultivars based on their performance in any given environment

Usage

ExamineEnv(GGEModel, Env, ...)

Arguments

GGEModel

An object of class GGEModel or gge

Env

environment to examine. Must be a string which matches an environment label

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
ExamineEnv(GGE1,"WP93")

Examine a genotype biplot

Description

Ranking the environments based on the relative performance of any given cultivar

Usage

ExamineGen(GGEModel, Gen, ...)

Arguments

GGEModel

An object of class GGEModel or gge

Gen

genotype to examine. Must be a string which perfectly matches an genotype label

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
ExamineGen(GGE1,"cas")

Produces genotype plus genotype-by-environment model from a 2-way table of means

Description

Calculates the GGE model where presented with a two way table of means with genotypes in rows, where genotype names are set as row names, and environments in columns, where environment names are set as column names. This function serves as a command line interface to the internal code contained within the archived package 'GGEBiplotGUI'. For dealing with missing data then a better implementation is available through gge.

Usage

GGEModel(Data, centering = "tester", scaling = "none", SVP = "column")

Arguments

Data

a data frame or matrix containing genotype by environment means with the genotypes in rows and the environments in columns. row names and column names should be set to indicate the genotype names and environment names.

centering

centering method. Either "tester" for tester centered (G+GE), "global" for global centered (E+G+GE), "double" for double centred (GE) or "none" for no centering. Models produced without centering cannot be used in the GGEPlot function.

scaling

scaling method. Either "sd" for standard deviation or "none" for no scaling.

SVP

method for singular value partitioning. Either "row","column","dual" or "symmetrical".

Value

A list of class GGEModel containing:

coordgenotype

plotting coordinates for genotypes from all components

coordenviroment

plotting coordinates for environments from all components

eigenvalues

vector of eigenvalues from each component

vartotal

overall variance

varexpl

percentage of variance explained by each component

labelgen

genotype names

labelenv

environment names

axes

axis labels

Data

scaled and centered input data

centering

name of centering method

scaling

name of scaling method

SVP

name of SVP method

References

Yan W, Kang M (2003). GGE Biplot Analysis: A Graphical Tool for Breeders, Geneticists, and Agronomists. CRC Press.

Yan W, Kang M (2002). Singular-Value Partitioning in Biplot Analysis of Multienvironment Trial Data. Agronomy Journal, 94, 990-996. doi:10.2134/agronj2002.0990

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
GGEPlot(GGE1)

GGE biplots with ggplot2

Description

Produces the GGE biplot as an object of class 'ggplot' from a model produced by a call to either GGEModel or gge. Nearly all stylistic attributes of output can either be customised within the function or disabled so that the user can customise output to their own liking.

Usage

GGEPlot(
  GGEModel,
  type = 1,
  d1 = 1,
  d2 = 2,
  selectedE = NA,
  selectedG = NA,
  selectedG1 = NA,
  selectedG2 = NA,
  colSegment = "red",
  colHull = "black",
  largeSize = 4.5,
  axis_expand = 1.2,
  axislabels = TRUE,
  axes = TRUE,
  limits = TRUE,
  titles = TRUE,
  footnote = TRUE,
  textGen = element_text(family = "", face = 1, color = "forestgreen", size = 4, hjust
    = 0, vjust = 0, angle = 0),
  textEnv = element_text(family = "", face = 1, color = "blue", size = 4, hjust = 0,
    vjust = 0, angle = 0)
)

Arguments

GGEModel

An object of class GGEModel or gge

type

type of biplot to produce.

  1. Basic biplot.

  2. Examine environment. See ExamineEnv

  3. Examine genotype. See ExamineGen

  4. Relationship among environments. See EnvRelationship

  5. Compare two genotypes. See CompareGens

  6. Which won where/what. See WhichWon

  7. Discrimination vs. representativeness. See DiscRep

  8. Ranking environments. See RankEnv

  9. Mean vs. stability. See MeanStability

  10. Ranking gentoypes See RankGen

d1

PCA component to plot on x axis. Defaults to 1

d2

PCA component to plot on y axis. Defaults to 2

selectedE

name of the environment to examine when type=2. Must be a string which matches an environment label

selectedG

name of the genotype to examine when type=3. Must be a string which matches a genotype label

selectedG1

name of a genotype to compare when type=5. Must be a string which matches a genotype label

selectedG2

name of a genotype to compare when type=5. Must be a string which matches a genotype label and not equal to selectedG1

colSegment

colour for segment or circle lines. Defaults to "red"

colHull

colour for hull when type=6. Defaults to "black"

largeSize

text size to use for larger labels where type=5, used for the two selected genotypes, and where type=6, used for the outermost genotypes. Defaults to 4.5

axis_expand

multiplication factor to expand the axis limits by to enable fitting of labels. Defaults to 1.2

axislabels

logical. If TRUE then include automatically generated labels for axes

axes

logical. If TRUE then include x and y axes going through the origin

limits

logical. If TRUE then automatically rescale axes

titles

logical. If TRUE then include automatically generated titles

footnote

logical. If TRUE then include automatically generated footnote

textGen

element_text for genotype labels

textEnv

element_text for environment labels

Value

A biplot of class ggplot

References

Yan W, Kang M (2003). GGE Biplot Analysis: A Graphical Tool for Breeders, Geneticists, and Agronomists. CRC Press.

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
GGEPlot(GGE1)

Mean vs. Stability Biplot

Description

Evaluating cultivars based on both average yield and stability

Usage

MeanStability(GGEModel, ...)

Arguments

GGEModel

An object of class GGEModel or gge

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
MeanStability(GGE1)

Ontario winter wheat (1993)

Description

The sample data are yields from the 1993 Ontario winter wheat (Triticum aestivum L.) performance trials, in which 18 cultivars were tested at nine locations (Yan and Kang 2003). Duplicated from the archived package 'GGEBiplotGUI'.

Usage

data(Ontario)

Format

A data frame with 18 observations on the following 10 variables.

Source

Yan W, Kang MS (2003). “GGE Biplot Analysis: A Graphical Tool for Breeders, Geneticists, and Agronomists.” CRC Press, Boca Raton, FL, USA.

Examples

data(Ontario)

Ranking Environments Biplot

Description

Ranking environments with respect to the ideal environment

Usage

RankEnv(GGEModel, ...)

Arguments

GGEModel

An object of class GGEModel or gge

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
RankEnv(GGE1)

Ranking genotypes with respect to the ideal genotype

Description

Ranking genotypes with respect to the ideal genotype

Usage

RankGen(GGEModel, axis_expand = 1.4, ...)

Arguments

GGEModel

An object of class GGEModel or gge

axis_expand

multiplication factor to expand the axis limits by to enable fitting of labels. Defaults to 1.4 for genotype ranking plot as the circles usually extend beyond limits of the other biplot types.

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
RankGen(GGE1)

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

Which Won Where/What Biplot

Description

Identifying the 'best' cultivar in each environment

Usage

WhichWon(GGEModel, ...)

Arguments

GGEModel

An object of class GGEModel or gge

...

Other arguments sent to GGEPlot

Examples

data(Ontario)
GGE1<-GGEModel(Ontario)
WhichWon(GGE1)