Description Usage Arguments Examples
This function returns the ID of an individual's spouse at a fixed date (accounting for multiple marriages, if possible).
1 | actual_spouse(x = NULL, evdat = NULL, df_ped = NULL, df_fam = NULL)
|
x |
An individual ID |
evdat |
Dates of interest in the Year-month-day format (e.g. "1850-01-01") |
df_ped |
A dataframe |
df_fam |
A dataframe containing variables for date of union ( |
1 2 3 4 5 6 | df_ind <- get_exmpl_df()
df_ind$bdate <- sample(seq(as.Date("1774-12-31"), as.Date("1874-12-31"), 100), nrow(df_ind))
df_fam <- data.frame(idf = c(0,unique(df_ind$momid[df_ind$momid>0])), fall = "C")
actual_spouse(sample_kh(df_ind, df_fam),
paste(sample(df_ind$bdate, 1)),
df_ind, df_fam)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.