matrix2h5 {signatureSearch} | R Documentation

## Write Matrix to HDF5 file

### Description

Function writes matrix object to an HDF5 file.

### Usage

    matrix2h5(matrix, h5file, name = "assay", overwrite = TRUE)

### Arguments

`matrix` | matrix to be written to HDF5 file, row and column name slots need to be populated
`h5file` | character(1), path to the hdf5 destination file
`name` | The name of the dataset in the HDF5 file. The default is write the score matrix (e.g. z-score, logFC) to the 'assay' dataset, users could also write the adjusted p-value or FDR matrix to the 'padj' dataset by setting the `name` as 'padj'.
`overwrite` | TRUE or FALSE, whether to overwrite or append matrix to an existing 'h5file'

### Value

HDF5 file containing exported matrix

### Examples

    mat <- matrix(rnorm(12), nrow=3, dimnames=list(
                  paste0("r",1:3), paste0("c",1:4)))
    h5file <- tempfile(fileext=".h5")
    matrix2h5(matrix=mat, h5file=h5file, overwrite=TRUE)

[Package signatureSearch version 1.6.3 Index]