Create a data frame with scores on all the B-HiTOP scales.
Usage
score_bhitop(
data,
items,
srange = c(1, 4),
prefix = "bhitop_",
na.rm = TRUE,
calc_se = FALSE,
append = TRUE,
tibble = TRUE
)
Arguments
- data
A data frame containing all B-HiTOP items (numerically coded).
- items
A vector of column names (as strings) or numbers (as integers) corresponding to the 45 B-HiTOP items in order.
- srange
An optional numeric vector specifying the minimum and maximum values of the B-HiTOP items, used for reverse-coding. (default =
c(1, 4)
)- prefix
An optional string to add before each scale column name. If no prefix is desired, set to an empty string
""
. (default ="bhitop_"
)- na.rm
An optional logical indicating whether missing values should be ignored when calculating scale scores. (default =
TRUE
)- calc_se
An optional logical indicating whether to calculate the standard error of each scale score. (default =
FALSE
)- append
An optional logical indicating whether the new columns should be added to the end of the
data
input. (default =TRUE
)- tibble
An optional logical indicating whether the output should be converted to a
tibble::tibble()
. (default =TRUE
)