get.pedindex {rres} | R Documentation |
Get pedigree index.
Description
get.pedindex
returns indices of individuals in the pedigree.
Usage
get.pedindex(pedinfo, member.set)
Arguments
pedinfo |
dataframe. |
member.set |
character vector. |
Details
member.set
contains member IDs of individuals of interest.
Value
An integer vector of indices for each individual of interest found in pedinfo
.
Examples
# a simple pedigree with sibling marriage
pedigree = as.character(rep(1, 5))
member = as.character(c(11, 12, 21, 22, 31))
sex = as.numeric(c(1, 2, 1, 2, 1))
father = as.character(c(NA, NA, 11, 11, 21))
mother = as.character(c(NA, NA, 12, 12, 22))
pedinfo = data.frame(pedigree, member, sex, father, mother, stringsAsFactors = FALSE)
get.pedindex(pedinfo, c("22", "31"))
[Package rres version 1.1 Index]