This vignette describes how the variables.csv
worksheet is organized and how to find variables that you can transform. See also the vignette variable_details.csv
. The Get Started vignette provides examples of how to use the two worksheets.
Read variables.csv
#> There are 238 variables, grouped in 32 subjects and 6 sections that are available for
#> transformation in CCHS cycles from 2001 to 2018.
#> You can search for variables in the table below. Try searching for the 6 age variables that are used in the Transform
#> CCHS variables vignette. All 6 variables are in the age subject. Try sorting the subject column by clicking
#> the up beside the `subject` heading: the top 6 rows of the table should show the age variables:
#> [1] "DHHGAGE_5" "DHHGAGE_A" "DHHGAGE_B" "DHHGAGE_C" "DHHGAGE_cont"
#> [6] "DHHGAGE_D"
variables.csv
sheet is organizedIn each row there are 7 columns in this worksheet and they are as follows:
variable: the name of the final transformed variable.
label: the shorthand label for the variable.
labelLong: a more detailed label for the variable.
section: the section where this variable could be found (i.e. demographic, health behaviour, chronic diseases).
subject: what the variable pertains to (i.e. age, smoking, sex).
variableType: whether the final variable is categorical or continuous.
units: any units for the final variable.
databaseStart: the list of CCHS surveys that contain the variable of interest
variableStart: the original names of the variables as they are listed in each respective CCHS cycle
Derived variables follow the same naming conventions as CCHS variables when being listed in variables.csv
.
variables.csv
We recommend that you copy variables.csv
with the variables that you use for your project. You can include only the variables that you use for your project, thereby providing a reference for your project. variables.csv
is a CSV file to allow use cchsflow
within teams that do not use R or have programming experience.
You can create your own transformed or derived variables by using the cchsflow variables.csv
as a template. We welcome issues for comments to existing variables in `variables.csv. Also welcomed are PR for new transformations that you feel are helpful for others who use the CCHS data. See Contributing.