Learn R Programming

Families (version 2.0.2)

IDfather: 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)

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

Arguments

idego

ID of ego(s)

d

Name of database. If missing the dataset dLH distributed with the Families package is used.

Examples

Run this code
# Load the data
data(dLH,package = "Families")

set.seed(31)
idf <- IDfather (idego=sample (dLH$ID[dLH$gen>=2],10))


Run the code above in your browser using DataLab