View source: R/tidying_functions.R
score | R Documentation |
Calculate mean scores on circumplex scales from item responses by using a set of scoring instructions, which may be loaded from the package or created as a custom data frame.
score(
data,
items,
instrument,
na.rm = TRUE,
prefix = "",
suffix = "",
append = TRUE
)
data |
Required. A data frame containing at least circumplex scales. |
items |
Required. The variable names or column numbers for the variables
in |
instrument |
Required. An instrument object from the package. To see the
available circumplex instruments, use |
na.rm |
Optional. A logical that determines if missing values should be omitted from the calculation of scores (default = TRUE). When set to TRUE, scales with missing data are essentially calculated with mean imputation. |
prefix |
Optional. A string to include at the beginning of the newly
calculated scale variables' names, before |
suffix |
Optional. A string to include at the end of the newly
calculated scale variables' names, after |
append |
Optional. A logical that determines whether the calculated
score variables will be appended to |
A data frame that matches .data
except that new variables are
appended that contain mean scores on each variable included in key
.
Other tidying functions:
ipsatize()
,
norm_standardize()
data("raw_iipsc")
instrument("iipsc")
score(raw_iipsc, items = 1:32, instrument = iipsc, prefix = "IIPSC_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.