ge_winners: Genotype-environment winners

Description Usage Arguments Value Author(s) Examples

View source: R/ge_winners.R

Description

[Stable]

Computes the ranking for genotypes within environments and return the winners.

Usage

1
ge_winners(.data, env, gen, resp, type = "winners", better = NULL)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes, and the response variable(s).

env

The name of the column that contains the levels of the environments.

gen

The name of the column that contains the levels of the genotypes.

resp

The response variable(s). To analyze multiple variables in a single procedure a vector of variables may be used. For example resp = c(var1, var2, var3). Select helpers are also allowed.

type

The type of results. Defaults to "winners" (default), i.e., a two-way table with the winner genotype in each environment. If type = "ranks" return the genotype ranking within each environment.

better

A vector of the same length of the number of variables to rank the genotypes according to the response variable. Each element of the vector must be one of the 'h' or 'l'. If 'h' is used (default), the genotypes are ranked from maximum to minimum. If 'l' is used then the are ranked from minimum to maximum. Use a comma-separated vector of names. For example, better = c("h, h, h, h, l"), for ranking the fifth variable from minimum to maximum.

Value

A tibble with two-way table with the winner genotype in each environment (default) or the genotype ranking for each environment (if type = "ranks").

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(metan)
ge_winners(data_ge, ENV, GEN, resp = everything())

# Assuming that for 'GY' lower values are better.
ge_winners(data_ge, ENV, GEN,
           resp = everything(),
           better = c("l, h"))

# Show the genotype ranking for each environment
ge_winners(data_ge, ENV, GEN,
           resp = everything(),
           type = "ranks")

metan documentation built on Nov. 10, 2021, 9:11 a.m.