Learn R Programming

Families (version 2.0.2)

IDmother: ID of mother of ego

Description

Retrieves the ID of mother of ego or mothers of vector of egos

Usage

IDmother(idego, d = NULL)

Value

ID of mother. Returns NA if ID of mother is not included in the database

Arguments

idego

ID

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.

Examples

Run this code

# load the data
data(dLH,package = "Families")
IDmother (sample(dLH$ID[dLH$gen==2],1),d=dLH)


Run the code above in your browser using DataLab