Retrieves ID of grandchildren of ego or vector of egos
Usage
IDgch(idego, d = NULL, keep_ego = FALSE)
Value
Two cases:
keep_ego=FALSE: The function IDgch() returns the IDs of grandchildren. If ego has no grandchildren or IDs of grandchildren are not
included in database, the missing data symbol NA is returned.
keep_ego=TRUE: IDgch() returns a data frame of
child-parent-grandparent triads. A triad consists of:
idego ID of grandparent (ego)
idch ID of child
idgch ID of grandchild
gp lineage: maternal grandfather, paternal grandmother, etc.
idMOM ID of mother of grandchild
idDAD ID of father of grandchild
Arguments
idego
ID of ego(s)
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.
keep_ego
If keep_ego=TRUE, parent-child-grandchild triads are shown.