View source: R/refitME_package.r
wt.var | R Documentation |
This function that calculates a weighted variance for a given vector.
wt.var(x, w)
x |
: a vector of numerical data. |
w |
: a vector of equal length to |
wt.var
returns a single value from analysis requested.
The developer of this function is Jeremy VanDerWal. See https://rdrr.io/cran/SDMTools/src/R/wt.mean.R
# Define simple data
x = 1:25 # Set of numbers.
wt = runif(25) # Some arbitrary weights.
# Display variances (unweighted and then weighted).
var(x)
wt.var(x, wt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.