Kin_long {Families}R Documentation

Converts a list vector of kin into a dataframe of kin

Description

Converts a list vector of kin into a dataframe of kin. The dataframe has a "long format", i.e. it has one row for each ego-kin dyad.

Usage

Kin_long(idkin)

Arguments

idkin

List vector of kin

Value

Dataframe of kin (long format)

Examples

# Load data
data(dLH,package="Families")
# IDs of ego and their grandchildren
idego <- dLH$ID[dLH$gen==1]
# IDs of grandchildren of ego 
idgch <- lapply(idego,function(x) IDch(IDch(x)))
names(idgch) <- idego
# Dataframe with ID of grandmother and grandchild
dfgch <- Kin_long(idkin=idgch)[,1:2]


[Package Families version 2.0.2 Index]