get_evmat_list: Array from event data

Description Usage Arguments Examples

Description

This function returns an array for event data in the form date, id, location, special, status. Here, gemini births count as one single event (see get_evmat_twins() for including the birth of twins as multiple events).

Usage

1
2
3
4
get_evmat_list(df_ev = NULL, vars = list(evdat = "evdat", evid = "evid",
  evloc = "evloc", evspc = "evspc", status = "status", evtyp = "evtyp", id =
  "id"), events = list(birth = "*", child = "#", death = "+"),
  events_exclude = list(marriage = "oo"), censored = TRUE)

Arguments

df_ev

A dataframe in long format containing individual events

vars

A list of variables for chronological date, ID related to event, location, special, status, and type of event)

events

A list of labels used in vars[["evtyp"]] to indicate births, born children, and deaths

censored

A logical indicator, whether censored dates should be included (Default is FALSE)

Examples

1
2
3
4
5
6
## Not run: 
df_ind <- get_exmpl_df()
df_fam <- data.frame(idf = c(0,unique(df_ind$momid[df_ind$momid>0])), fall = "C")
evmat <- get_evmat(df_ind, df_fam)

## End(Not run)

johow/kinlab documentation built on July 5, 2019, 4:23 p.m.