A step of the RcppExports implementation. Called by morie_var.
See the file header for the source the module follows.
Arguments
- x
Passed to .Call.
- ddof
Passed to .Call. Defaults to 1L.
- shared
Use the rmoriebricklayer kernel (TRUE) or the
identical kernel rmorie vendors (FALSE). Defaults to TRUE.
Value
The value of .Call.
Examples
x <- c(2, 4, 4, 4, 5, 5, 7, 9)
morie_var_cpp(x) # sample variance, as var(x)
#> [1] 4.571429
morie_var_cpp(x, ddof = 0L) # population variance
#> [1] 4
morie_var_cpp(rep(1e120, 3), shared = FALSE) # 0, not 3e208
#> [1] 0