nutSmoke: nutSmoke will create smoking status variables for each survey...

Description Usage Arguments Value Author(s) Examples

View source: R/nutSmoke.r

Description

The function will pull in the appropriate smoking variables (SMK92, SMK97, and the CIGNOW variables) and recode them into never/current/former/missing smoking status.

Usage

1
nutSmoke(sex="BOTH", initialPath=file.path("s:/cps"))

Arguments

sex

Character vector, "BOTH", "MEN", or "WOMEN". Not case sensitive

initialPath

File path: defaults to "s:/cps", but can change to run locally if needed.

Value

Returns a data frame with 12 variables: $ID - 14-digit CPS2 ID $SMOKE92-$SMOKE15 - Smoking status variables for each survey year

Author(s)

Brian Carter

Examples

1
2
3
4
5
smoke <- nutSmoke("BOTH",file.path("s:/cps"))


{ ~kwd1 }
{ ~kwd2 }

buddha2490/MargotFun documentation built on Nov. 4, 2019, 8:16 a.m.