View source: R/scores_su_sui_tlfb.R
sui_substances | R Documentation |
Computes the age (in years) of onset use of a given substance.
Returns NA
for the participants with no onset use of the provided
substance reported.
sui_substances
compute_su_y_sui__onset_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“). |
sui_substances
is a character vector of substances keywords.
tbl. The input data frame with the summary score appended as a new column.
## Not run:
compute_su_y_sui__onset_useage(
data = data_sui,
name = "su_y_sui__alc__onset_useage",
substance = "alc"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.