View source: R/Elston-objects.r
es.pedigree | R Documentation |
Creates a pedigree from vectors giving individuals' id, fathers' id, mothers' is, sex, phenotype and genotype
es.pedigree(id, father, mother, sex, pheno, geno, famid)
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 |
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
.
An object of class S3 es.pedigree
plot.es.pedigree
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.