View source: R/make_scale_total.R
| make_scale_total | R Documentation |
Computes the total score for a psychometric scale by summing specified numeric variables. The resulting total score is appended as a new column to the input data frame. Missing values are handled using 'na.rm = TRUE'.
make_scale_total(data, vars, new_var)
data |
A data frame. |
vars |
A character vector of column names to be summed. |
new_var |
A single character string specifying the name of the new total score column. |
The input data frame with one additional numeric column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.