es.pedigree: Creates a pedigree

View source: R/Elston-objects.r

es.pedigreeR Documentation

Creates a pedigree

Description

Creates a pedigree from vectors giving individuals' id, fathers' id, mothers' is, sex, phenotype and genotype

Usage

es.pedigree(id, father, mother, sex, pheno, geno, famid)

Arguments

id

a numeric vector of unique individuals id. Ids must be different from 0

father

a vector giving the id of the father of each individual (0 for founder)

mother

a vector giving the id of the mother of each individual (0 for founder)

sex

a vector giving the sex of each individual (1 = male, 2 = female)

pheno

a list giving the phenotypes of each individual

geno

a list giving the genotypes of each individual

famid

(facultative) a family id, used only to issue error messages

Details

All vectors must have the same length, including the lists pheno and geno. The list geno is a list of vectors containing the possible genotypes of each individual. The format of pheno depends on the modele which will be used to compute likelihoods with Elston or Likelihood.

Value

An object of class S3 es.pedigree

See Also

plot.es.pedigree

Examples

## cf Elston-Stewart vignette for more coments on this example
data(conrad2)
# creating an es.pedigree object
genotypes <- c( rep(list(0:2), 21), 2 )

X <- es.pedigree( id = conrad2$id, father = conrad2$father, mother = conrad2$mother,
      sex = conrad2$sex, pheno = rep(0, 22), geno = genotypes )
X  # displays a short information on X

ElstonStewart documentation built on June 20, 2022, 5:15 p.m.