IDsib | R Documentation |
Retrieves IDs of siblings of ego
IDsib(idego, d = NULL)
idego |
ID of ego |
d |
Name of database. If d is missing, the dataset dLH in the global environment (R workspace) is used. If no dLH in the global environment, the database dLH distributed with the Families package is used. |
A list vector of two elements.
dfsib: dataframe of IDs of ego-sibling dyads.
id: vector of IDs of siblings.
Returns NA if ID of sibling cannot be computed because the ID of mother is not included in the database.
# Load data
data(dLH,package="Families")
# IDs of siblings of single member of generation 3
set.seed(34)
idego <- sample(dLH$ID[dLH$gen==3],1)
idsib <- IDsib (idego)
# For each member of generation 2, IDs of siblings
idego <- dLH$ID[dLH$gen==2]
idsib <- IDsib(idego)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.