bdAdd_hdf5_matrix: Write matrix to existing hdf5 file

View source: R/RcppExports.R

bdAdd_hdf5_matrixR Documentation

Write matrix to existing hdf5 file

Description

Creates a hdf5 file with numerical data matrix,

Usage

bdAdd_hdf5_matrix(
  object,
  filename,
  group,
  dataset,
  transp = NULL,
  force = FALSE
)

Arguments

object

numerical data matrix

filename,

character array indicating the name of the file to create

group,

character array indicating folder or group name to put the matrix in hdf5 file

dataset,

character array indicating the dataset name that contains the matix data

transp,

boolean if true, data is manipulated in transposed form

force,

optional boolean if true and file exists, removes old file and creates a new file with de dataset data.

Value

none

Examples


matA <- matrix(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), nrow = 3, byrow = TRUE)
matB <- matrix(c(15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,5,3,4,5,2,6,2,3,4,
                   42, 23, 23, 423,1,2), nrow = 3, byrow = TRUE)
                   
bdCreate_hdf5_matrix_file("BasicMatVect.hdf5", matA, "INPUT", "matA")
bdAdd_hdf5_matrix(matB, "BasicMatVect.hdf5", "INPUT", "matB")

# Remove file (used as example)
  if (file.exists("BasicMatVect.hdf5")) {
    # Delete file if it exist
    file.remove("BasicMatVect.hdf5")
  }


BigDataStatMeth documentation built on March 30, 2022, 1:07 a.m.