View source: R/scores_su_sui_tlfb.R
compute_su_y_sui__reg_useage | R Documentation |
Computes the age (in years) of regular use of a given substance.
Returns NA
for the participants with no regular use of the provided
substance reported.
compute_su_y_sui__reg_useage(data, name, substance, combine = TRUE)
data |
tibble. A data frame containing the data. |
name |
character. The name of the output column for the computed score. |
substance |
character (vector). The substance to compute the score for. Must be one of the following values:
|
combine |
logical. Whether to combine the summary score column with the input data frame (Default: 'TRUE“). |
tbl. The input data frame with the summary score appended as a new column.
## Not run:
compute_su_y_sui__reg_useage(
data = data_sui,
name = "su_y_sui__alc__reg_useage",
substance = "alc"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.