bdblockmult_sparse_hdf5 | R Documentation |
This function performs a block matrix-matrix multiplication with numeric matrix
bdblockmult_sparse_hdf5(filename, group, A, B, outgroup = NULL)
filename |
string file name where dataset to normalize is stored |
group |
string Matrix |
A, |
string with dataset name where matrix is stored |
B, |
string with dataset name where matrix is stored |
outgroup |
string with de group name under the matrix will be stored |
list with filename and the group and dataset name under the results are stored
library(Matrix) library(BigDataStatMeth) k <- 1e3 set.seed(1) x_sparse <- sparseMatrix( i = sample(x = k, size = k), j = sample(x = k, size = k), x = rnorm(n = k) ) set.seed(2) y_sparse <- sparseMatrix( i = sample(x = k, size = k), j = sample(x = k, size = k), x = rnorm(n = k) ) if( isTRUE(file.exists('BasicMatVect.hdf5'))) { file.remove('BasicMatVect.hdf5') } bdCreate_hdf5_matrix_file("BasicMatVect.hdf5", as.matrix(x_sparse), "SPARSE", "x_sparse") bdAdd_hdf5_matrix(as.matrix(y_sparse), "BasicMatVect.hdf5", "SPARSE", "y_sparse") d <- bdblockmult_sparse_hdf5("BasicMatVect.hdf5", "SPARSE", "x_sparse", "y_sparse") # Remove file (used as example) if (file.exists("BasicMatVect.hdf5")) { # Delete file if it exist file.remove("BasicMatVect.hdf5") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.