Compute a missingness-adjusted row sum.
Details
Take row mean across columns (items) and then multiply by number of items to
account for missing (NA
) values.
Examples
# Prepare Data
df <- data.frame(item1 = rnorm(1000), item2 = rnorm(1000), item3 = rnorm(1000))
# Calculate Missingness-Adjusted Row Sum
df$missingnessAdjustedSum <- meanSum(df)