Since a kinship matrix has subject ids in both rownames and colnames, so we need to remove rows and columns according to names in 'id2keep'. We first remove rows and columns of subjects that are not in 'id2keep'. We then order rows and columns of the resulting matrix by the ordering in 'id2keep'.
1 | subset_kinship(kinship, id2keep)
|
kinship |
a kinship matrix |
id2keep |
a character vector of subject ids to identify those subjects that are shared by all inputs |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.