Computes the number of conditions (provided as a character vectorcond),
involving the input variables vars, that were found to be TRUE.
Options available to exclude certain values from the input variables
(provided as a character vector exclude).
ss_count_cond(data, name, vars, exclude = NULL, combine = FALSE, cond, max_na)tbl. The input data frame with the summary score appended as a new column.
tbl. Data frame containing the columns to be summarized.
character. The name of the summary score.
character vector. The names of the columns to be summarized.
character (vector). The value(s) to be excluded (Default: NULL; all values are used).
logical. Whether to combine the summary score column with the input data frame (Default: FALSE).
character vector. Each specified condition, involving the values
of specific input fields, gets tested for 1 (TRUE) or 0 (FALSE).
If a condition is specified as "field_name", the numeric value
in the field is counted and could be greater than 1. Whereas other
conditions when met can get a value of 1 or 0. The summary score
is a sum over all the values obtained from testing each condition
specified in cond.
numeric, positive whole number. Number of missing items allowed.