IDsib {Families}R Documentation

IDs of siblings of ego

Description

Retrieves IDs of siblings of ego

Usage

IDsib(idego, d = NULL)

Arguments

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.

Value

A list vector of two elements.

Returns NA if ID of sibling cannot be computed because the ID of mother is not included in the database.

Examples

# 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)


[Package Families version 2.0.2 Index]