getMatrixForm {IBCF.MTME}R Documentation

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

## Not run: 
  data('Wheat_IBCF')
  M <- getMatrixForm(Wheat_IBCF)

## End(Not run)

## Not run: 
  data('Year_IBCF')
  M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T)

## End(Not run)

[Package IBCF.MTME version 1.6-0 Index]