IDfather {Families} | R Documentation |
ID of father of ego
Description
Retrieves the ID of the father of ego or fathers of vector of egos. ID of the father is the ID of the partner of the mother. If the ID of the father listed in the dataset d differs from the ID of the mother's partner, a warning is given.
Usage
IDfather(idego, d = NULL)
Arguments
idego |
ID of ego(s) |
d |
Name of database. If missing the dataset dLH distributed with the Families package is used. |
Value
ID of father or (if keep_ego=TRUE, dataframe with ego-father dyals: ID of ego and ID of father). Returns NA if ID of father is not included in the database
Examples
# Load the data
data(dLH,package = "Families")
set.seed(31)
idf <- IDfather (idego=sample (dLH$ID[dLH$gen>=2],10))
[Package Families version 2.0.2 Index]