Description Usage Arguments Value See Also
Average values across multiple columns for each row of a data.frame
1 2 |
data |
a |
selector |
a |
reverse |
a numeric vector indicating items or variables to reverse code using
|
show |
choose whether or not show the results of the reverse coding. If TRUE,
the result of the function will be a |
mini |
the minimum value of a scale score (used when reverse = T) |
maxi |
the maximum value of a scale score (used when reverse = T) |
a vector of the averaged values for each row from the specified columns of the data frame.
This function, and those specified below in 'See Also', work best when used
inside a call to dplyr
's mutate()
for creating new variables.
The point of the function is to make it easy to use select helpers from
the tidyselect (and used in dplyr extensively) to select variables for aggregation,
such as an average score for a number of questionnaire items, the sum of correct responses,
or finding the number of missing values in a row.
tidy_sum_rows
for row summing, tidy_sum_missings
for summing
missing values, and tidy_sd_rows
for calculating standard deviations across rows.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.