write_dgCMatrix_csv: Write a dgCMatrix to CSV in reasonable chunks

Description Usage Arguments

View source: R/write_csv.R

Description

This function makes it so that we don't have to explode a dgCMatrix to a full matrix in order to write the matrix to a CSV file with a named first column derived from rownames(mat).

Usage

1
2
write_dgCMatrix_csv(mat, filename, col1_name = "gene",
  chunk_size = 1000)

Arguments

mat

the dgCMatrix to write

filename

the target CSV file

col1_name

the name of the first column to write

chunk_size

the number of rows to retrieve per chunk. Lower = less RAM usage.


AllenInstitute/scrattch.io documentation built on Nov. 17, 2021, 10:06 a.m.