Learn R Programming

IBCF.MTME (version 1.6-0)

getMatrixForm: Tidy data format to Matrix format

Description

Tidy data format to Matrix format

Usage

getMatrixForm(Tidy_DataSet, onlyTrait = FALSE)

Arguments

Tidy_DataSet

data.frame object that contains 4 columns: $Line: Line or genotype identifier, and the name of this column could change. $Env: Name of the evaluated environment (s). $Trait: Name of the evaluated trait (s). $Response: Variable response obtained for the row corresponding to line and environment.

onlyTrait

logical by default is FALSE, if is TRUE only the column $Trait is transformed.

Value

A data.frame object with the $Response divided by $Traits columns.

Examples

Run this code
# NOT RUN {
  data('Wheat_IBCF')
  M <- getMatrixForm(Wheat_IBCF)
# }
# NOT RUN {
# }
# NOT RUN {
  data('Year_IBCF')
  M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T)
# }

Run the code above in your browser using DataLab