apply_function: Apply a statistical or algebraic function to HDF5 datasets...

View source: R/S3_operations.R

apply_functionR Documentation

Apply a statistical or algebraic function to HDF5 datasets (generic)

Description

Generic function that applies one of BigDataStatMeth's algebraic or statistical functions to a list of datasets in the same HDF5 group as x.

Valid func values: "QR", "CrossProd", "tCrossProd", "invChol", "blockmult", "CrossProd_double", "tCrossProd_double", "solve", "normalize", "sdmean", "descChol".

Usage

apply_function(x, ...)

Arguments

x

An HDF5Matrix.

...

Additional arguments forwarded to the method.

Value

Named list with elements filename, out_group, func, datasets.

See Also

hdf5_apply

Examples


fn <- tempfile(fileext = ".h5")

# Create two datasets in the same group
hdf5_create_matrix(fn, "data/A", data = matrix(rnorm(50), 5, 10))
hdf5_create_matrix(fn, "data/B", data = matrix(rnorm(50), 5, 10))

# Apply CrossProd to all datasets in the group
X   <- hdf5_matrix(fn, "data/A")
res <- apply_function(X, func = "CrossProd", out_group = "RESULTS")

hdf5_close_all()
unlink(fn)



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