# NOT RUN {
# COPD_Emph_der_fun1() to create values across CCHS cycles
# (2005-2008) COPD_Emph_der_fun1() is specified in
# variable_details.csv along with the CCHS variables and cycles included.
# To transform COPD_Emph_der, use rec_with_table() for each CCHS cycle
# and specify COPD_Emph_der, along with the various respiratory
# variables. Then by using merge_rec_data() you can combine COPD_Emph_der
# across cycles.
library(cchsflow)
COPD2005 <- suppressWarnings(rec_with_table(
cchs2005_p, c(
"DHHGAGE_cont", "CCC_91E", "CCC_91F",
"COPD_Emph_der"
)
))
head(COPD2005)
COPD2007_2008 <- suppressWarnings(rec_with_table(
cchs2007_2008_p, c(
"DHHGAGE_cont", "CCC_91E", "CCC_91F",
"COPD_Emph_der"
)
))
tail(COPD2007_2008)
combined_COPD <- suppressWarnings(merge_rec_data(COPD2005, COPD2007_2008))
head(combined_COPD)
tail(combined_COPD)
# }
Run the code above in your browser using DataLab