This function allows users to merge CCHS data transformed by the
rec_with_table function. This function generates a labelled
merged data frame with multiple transformed CCHS cycles.
recoded data frames to be merged.
When merging recoded CCHS data, there are variables that are missing in certain CCHS cycles. This function tags missing variable observations as NA(c), indicating that the variable was not asked or included in the CCHS cycle of the respondent.
Click here for more details on how NA's are treated in cchsflow.
a merged data frame consisting of multiple recoded CCHS cycles with labels for variable names and tags for variables not included in particular CCHS cycles.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Merging two CCHS cycles with variables missing in each cycle. # INCGHH_A is a cchsflow variable available for the 2001 CCHS cycle, while # INCGHH_B is a cchsflow variable available for the 2003 CCHS cycle. # Using merge_rec_data(), datasets containing INCGHH_A & INCGHH_B can be # merged and tagged. library(cchsflow) income2001 <- rec_with_table(cchs2001_p, "INCGHH_A") income2003 <- rec_with_table(cchs2001_p, "INCGHH_B") income_merged <- merge_rec_data(income2001, income2003) head(income_merged) tail(income_merged)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.