dense2sparse: Convert numeric matrix to sparse matrix

dense2sparseR Documentation

Convert numeric matrix to sparse matrix

Description

Reads a numeric genotype file and converts it to a sparse matrix format.

Usage

dense2sparse(file.name, num.genotypes, separator, progress = TRUE)

Arguments

file.name

Path to the numeric genotype file. Could be (and should be) gzipped.

num.genotypes

Maximum number of genotypes to read. An upper bound is OK.

separator

"\t" or "," etc that separates the entries in a line.

progress

Whether to show a progress bar (default TRUE).

Value

A sparse matrix of class dgCMatix.


bravo documentation built on May 27, 2026, 5:08 p.m.