# NOT RUN {
# Using RACDPAL_fun() to transform RACDPAL in 2001.
# RACDPAL_fun() is specified in variable_details.csv along with the
# CCHS variables and cycles included.
# To transform RACDPAL, use rec_with_table() for each the 2001 cycle
# and specify RACDPAL, along with the various ADL variables.
library(cchsflow)
RACDPAL_2001 <- rec_with_table(
cchs2001_p, c(
"RAC_1", "RAC_2A", "RAC_2B", "RAC_2C", "RACDPAL"
)
)
head(RACDPAL_2001)
# Note: In other CCHS cycles you only need to specify RACDPAL as the variable
# was included in those survey cycles.
# Using RACDPAL_fun() with user inputted data.
# Let's say you're an individual that sometimes has difficulties with
# activities due to disability, sometimes has a reduction in activities at
# home, often has a reduction at school or work, and never has a reduction
# in other activities. Your participation and activity limitation can be
# determined as follows:
library(cchsflow)
RACDPAL <- RACDPAL_fun(1, 1, 2, 3)
print(RACDPAL)
# }
Run the code above in your browser using DataLab