Skip to contents

Add a matrix.

Usage

# S3 method for class 'MarchRDataset'
add_matrix(proj, mat, mat_name = character(0), overwrite = FALSE)

# S3 method for class 'MarchRProject'
add_matrix(
  proj,
  mat,
  mat_name = character(0),
  dataset_name = character(0),
  overwrite = FALSE,
  prefix_cells = TRUE
)

Arguments

proj

(MarchRProject or MarchRDataset) The project or dataset to add the matrix to.

mat

(IterableMatrix) The matrix to add.

mat_name

(character) The name of the matrix to add.

overwrite

(logical) If TRUE, overwrite the matrix if it already exists. If FALSE, an error will be raised if the matrix already exists.

prefix_cells

(logical) If TRUE (default), prefix dataset_name# to cell names to ensure uniqueness across datasets.