Big-Life-Lab / cchsflow

Variable transformation and harmonization for the Canadian Community Health Survey
https://big-life-lab.github.io/cchsflow/
Other
11 stars 7 forks source link

Time since quit derived variable #85

Closed wyusuf068 closed 3 years ago

wyusuf068 commented 3 years ago

Add derived variable/function that can be used in other smoking derived variables.

Once merged, other smoking derived variables will be refactored to include derived variable.

@CBjerke once this PR is closed, I will merge these changes into the simplified smoking branch to complete https://github.com/Big-Life-Lab/cchsflow/pull/81.

wyusuf068 commented 3 years ago
  1. I think we should rename the file to time-since-quit-smoking.R so to make it specific to smoking since time sine quit can also refer to alcohol for example.
  2. I think time_quit_der should be renamed time_quit_smoking_der for the same reason.

@yulric I was wondering if we should move all smoking functions into smoking.R? That way we can reduce the number of R files in the package.

@CBjerke @DougManuel thoughts?