colVars: Column and row variances for HDF5Matrix

View source: R/S3_aggregations.R

colVarsR Documentation

Column and row variances for HDF5Matrix

Description

Block-wise computation of column and row variances (Bessel's correction, n-1). Returns NaN for columns/rows with fewer than 2 observations, matching base R behaviour.

Usage

colVars(x, ...)

## S3 method for class 'HDF5Matrix'
colVars(
  x,
  paral = NULL,
  wsize = NULL,
  threads = NULL,
  save_to = NULL,
  overwrite = TRUE,
  ...
)

rowVars(x, ...)

## S3 method for class 'HDF5Matrix'
rowVars(
  x,
  paral = NULL,
  wsize = NULL,
  threads = NULL,
  save_to = NULL,
  overwrite = TRUE,
  ...
)

Arguments

x

An HDF5Matrix object.

...

Ignored.

paral

Logical or NULL. Enable OpenMP parallelisation.

wsize

Integer or NULL. Block size for HDF5 reads (NULL = auto).

threads

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

save_to

Where to save the result (see Details). NULL returns a plain R vector; a character string "group/dataset" saves in the same file as x; a named list list(file = "f.h5", path = "group/dataset") saves in a different file. In both non-NULL cases an HDF5Matrix handle is returned.

overwrite

Logical. Overwrite an existing dataset at save_to? (Currently always TRUE when save_to is not NULL.)

Value

A numeric vector (when save_to = NULL) or an HDF5Matrix handle to the persisted result.


BigDataStatMeth documentation built on May 15, 2026, 1:07 a.m.