metan (version 1.2.1)

ge_means: Genotype-environment means

Description

Computes genotype-environment interaction means

Usage

ge_means(.data, env, gen, resp)

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 at once, a vector of variables may be used. For example resp = c(var1, var2, var3). Select helpers are also allowed.

Value

A list where each element is the result for one variable containing:

  • ge_means: A two-way table with the means for genotypes (rows) and environments (columns).

  • gen_means: A tibble with the means for genotypes.

  • env_means: A tibble with the means for environments.

Examples

Run this code
# NOT RUN {
library(metan)
means_ge <- ge_means(data_ge, ENV, GEN, resp = everything())

# Genotype-environment interaction means
get_model_data(means_ge)

# Environment means
get_model_data(means_ge, what = "env_means")

# Genotype means
get_model_data(means_ge, what = "gen_means")

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab