Description Usage Arguments See Also
Computes a weighted sum of a numeric vector.
1 | weightedSum(x, w, na.rm = TRUE)
|
x |
a numeric vector containing the values whose weighted sum is to be computed. |
w |
a vector of weights the same length as x giving the weights to use for each element of x. Negative weights are treated as zero weights. Default value is equal weight to all values.# |
na.rm |
a logical value indicating whether NA values in x should be stripped before the computation proceeds, or not. If NA, no check at all for NAs is done. Default value is NA (for efficiency). |
Other "central tendency functions":
weightedCount
, weightedMean
,
weightedMedian
Other stats helper functions: allNA
,
allNull
, is.yesno
,
qType
, reorderQuestion
,
reorderResponse
,
splitBinCombine
,
splitMeanCombine
,
splitPercentCombine
,
weightedCount
, weightedMean
,
weightedMedian
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.