normalize_scores_df {stenR} | R Documentation |
Normalize raw scores for multiple variables
Description
Wrapper for normalize_score()
that works on data frame
and multiple variables
Usage
normalize_scores_df(data, vars, ..., what, retain = FALSE, .dots = list())
Arguments
data |
|
vars |
names of columns to normalize. Length of |
... |
|
what |
the values to get. One of either:
|
retain |
either boolean: |
.dots |
|
Value
data.frame
with normalized scores
See Also
Other score-normalization functions:
normalize_scores_grouped()
,
normalize_scores_scoring()
,
normalize_score()
Examples
# normalize multiple variables with FrequencyTable
suppressMessages({
ft_H <- FrequencyTable(HEXACO_60$HEX_H)
ft_E <- FrequencyTable(HEXACO_60$HEX_E)
ft_X <- FrequencyTable(HEXACO_60$HEX_X)
})
normalize_scores_df(data = head(HEXACO_60),
vars = c("HEX_H", "HEX_E", "HEX_X"),
ft_H,
ft_E,
ft_X,
what = "quan")
# normalize multiple variables with ScoreTable
st_H <- ScoreTable(ft_H, STEN)
st_E <- ScoreTable(ft_E, STEN)
st_X <- ScoreTable(ft_X, STEN)
normalize_scores_df(data = head(HEXACO_60),
vars = c("HEX_H", "HEX_E", "HEX_X"),
st_H,
st_E,
st_X,
what = "sten")