Learn R Programming

GWAF (version 2.0)

makekinship: Create a kinship matrix

Description

Compute the overall kinship matrix for a collection of families. This function and R documentation are included from the archived kinship package, which is available at http://cran.r-project.org/web/packages/kinship/index.html.

Usage

makekinship(famid, id, father.id, mother.id, unrelated=0)

Arguments

Value

a kinship matrix

Examples

Run this code
> ped <- read.csv("ped.csv")
> names(ped)
[1] "id"       "famid"    "fa"       "mo"       "sex"     
> kmat<-makekinship(ped$famid,ped$id,ped$fa,ped$mo)

Run the code above in your browser using DataLab