weighted_mean_sd | R Documentation |
Helper function to compute weighted mean and standard deviation. Deals gracefully whether x is sparse matrix or not.
weighted_mean_sd(x, weights = rep(1, nrow(x)))
x |
Observation matrix. |
weights |
Optional weight vector. |
A list with components.
mean |
vector of weighted means of columns of x |
sd |
vector of weighted standard deviations of columns of x |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.