Sum variables using scoresheet
Value
raw tibble with four additional columns appended:
{n_var}
: a column which is the sum of items - NAs are treated as '0' values
{n_var}_complete
: a column with the sum of items -- rows that contain any NA values return NA
{n_var}_NAs
: a column with the count of NAs among items contributing to the sum
{n_var}_NA_percent
: a column with the percentage of NAs among the variables contributing to the sum
{n_var}_weighted_sum
: a column with a sum weighted by the number of items contributing to the sum