| pack_years_calculator | R Documentation |
Calculates the number of pack-years, a standard measure of cumulative cigarette smoking exposure. One pack-year is defined as smoking 20 cigarettes (one pack) per day for one year.
pack_years_calculator(packs_per_day = NULL, cigarettes_per_day = NULL, years_smoked)
packs_per_day |
Numeric. The number of packs of cigarettes smoked per day. (Optional if cigarettes_per_day is provided). |
cigarettes_per_day |
Numeric. The number of individual cigarettes smoked per day. (Optional if packs_per_day is provided). |
years_smoked |
Numeric. The total number of years the patient has smoked. |
Formula:
Pack Years = \frac{Cigarettes Per Day}{20} \times Years Smoked
OR
Pack Years = Packs Per Day \times Years Smoked
A list containing:
Pack_Years |
The calculated pack-years value. |
Bernhardt PW, et al. Pack-years of smoking as a predictor of lung cancer.
# Example 1: Using packs per day
# 1.5 packs/day for 20 years
pack_years_calculator(packs_per_day = 1.5, years_smoked = 20)
# Example 2: Using cigarettes per day
# 10 cigarettes/day for 15 years
# 10/20 = 0.5 packs * 15 years = 7.5 pack-years
pack_years_calculator(cigarettes_per_day = 10, years_smoked = 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.