mean-sparse_numeric-method.Rd
Computes the mean of a sparse_numeric vector, including all the zeros.
sparse_numeric
# S4 method for class 'sparse_numeric' mean(x, ...)
A sparse_numeric object.
Additional arguments.
A numeric scalar representing the mean.
x <- new("sparse_numeric", value = c(1, 2), pos = c(2L, 5L), length = 6L) mean(x) #> [1] 0.5