Description Usage Arguments Examples
This function returns random draws of mother IDs from a selection of families being classified as 'fully documented'.
1 | sample_kh(df_ind, df_fam, n = 1)
|
df_ind |
A dataframe |
df_fam |
A dataframe containing |
n |
Number of draws to perform. For n equal or larger the number of mothers in initial sample, the vector of all mother IDs is returned instead. Default is 1. |
1 2 3 4 | 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")
sample_kh(df_ind, df_fam)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.