Kin_long | R Documentation |
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.
Kin_long(idkin)
idkin |
List vector of kin |
Dataframe of kin (long format)
# 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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.