Learn R Programming

BigDataStatMeth (version 2.0.3)

var: Variance of all elements of an HDF5Matrix

Description

Equivalent to var(as.vector(X)) — treats all matrix elements as a single sample and uses Bessel's correction (N-1).

Usage

var(x, y = NULL, na.rm = FALSE, use, ...)

# S3 method for HDF5Matrix var( x, y = NULL, na.rm = FALSE, use, paral = NULL, wsize = NULL, threads = NULL, save_to = NULL, overwrite = TRUE, ... )

Value

Scalar numeric or an HDF5Matrix when save_to is set.

Arguments

x

An HDF5Matrix object.

y

Ignored. Present for compatibility with stats::var.

na.rm

Ignored (included for generic compatibility).

use

Ignored. Present for compatibility with stats::var.

...

For Summary methods: additional objects (currently not supported; raises an error if supplied).

paral

Logical or NULL. Enable OpenMP parallelisation.

wsize

Integer or NULL. Block size (NULL = auto).

threads

Integer or NULL. Number of threads (NULL = auto).

save_to

Optional persistence target (same format as colSums.HDF5Matrix).

overwrite

Logical. Overwrite existing dataset when saving.