View source: R/scores_su_sui_tlfb.R
compute_su_y_sui__last__day_count | R Documentation |
Computes the number of days since the last use of a given substance
as of the day of the substance use interview.
Returns NA
for the participants with no reported use of the provided
substance.
compute_su_y_sui__last__day_count(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__last__day_count(
data = data_sui,
name = "su_y_sui__alc__last__day_count",
substance = "alc"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.