meanSum | R Documentation |
Compute a missingness-adjusted row sum.
meanSum(x)
x |
Matrix or dataframe with participants in the rows and items in the columns. |
Take row mean across columns (items) and then multiply by number of items to
account for missing (NA
) values.
Missingness-adjusted row sum.
Other computations:
Mode()
,
kish_ess()
,
mySum()
# Prepare Data
df <- data.frame(item1 = rnorm(1000), item2 = rnorm(1000), item3 = rnorm(1000))
# Calculate Missingness-Adjusted Row Sum
df$missingnessAdjustedSum <- meanSum(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.