setPhenotypes: Set trait values for one or several genotypes.

Description Usage Arguments Value Examples

View source: R/setup.R

Description

Set trait values for one or several genotypes.

Usage

1
2
setPhenotypes(genopheno, traitName, genotypes, traitValue,
  equivalent = "phase")

Arguments

genopheno

genopheno object specifying the genetic setup.

traitName

The name of the trait whose values are to be set.

genotypes

A vector of strings specifying genotypes.

traitValue

The trait value.

equivalent

Argument determining which genotypes are to be treated as equivalent. Possible options are "phase" (genotypes that differ only by phase are equivalent, i.e. the order of alleles within a locus does not matter), "origin" (phase is important but not the origin of alleles), and "none" (no two genotypes are equivalent).

Value

genopheno object with trait information added.

Examples

1
2
3
4
MendelsPeas <- newGenopheno(nloci = 1, alleleNames = list(c('Y', 'y')))
MendelsPeas <- setPhenotypes(MendelsPeas, 'colour', 'Y_', 'yellow')
MendelsPeas <- setPhenotypes(MendelsPeas, 'colour', 'yy', 'green')
getPhenotypes(MendelsPeas)

JanEngelstaedter/peas documentation built on May 5, 2019, 1:33 a.m.