tidy_sd_rows: Updated version of 'sd_rows()'

Description Usage Arguments Value Details See Also

Description

Updated version of sd_rows()

Usage

1
tidy_sd_rows(data, selector)

Arguments

data

a data.frame to use for row standard deviations

selector

a dplyr::select helper function, for example starts_with()

Value

a vector of the standard deviations for each row from the specified columns of the data frame.

Details

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.

See Also

tidy_avg_rows for row averaging across rows, tidy_sum_rows for row summing , and tidy_sum_missings for summing missing values


ethan-young/esyr documentation built on May 15, 2019, 12:45 p.m.