calc_sum: Calculate sum of variables

Description Usage Arguments

View source: R/calc-sum.R

Description

Calculate sum addressing item-level missing data using proration

Usage

1
2
calc_sum(data, id_str, var_str, session_str, n_min, item_scores = FALSE,
  short_var_name = TRUE, timepoint_str = "s", sep = "_")

Arguments

data

Wide dataframe.

id_str

String of identifier variable.

var_str

String of variable to calculate sum for.

session_str

String of session number.

n_min

Minimum number of available scores to calculate sum.

item_scores

Add item scores after sum.

sep

seperator for variable names.

sort_sum_item

Logical, if TRUE and multiple sessions then output dataframe will be organised sum_timepoint followed by all items for that timepoint, if FALSE all sums will come after id variable followed by all items.


milanwiedemann/psychdata documentation built on June 8, 2020, 6:57 p.m.