readSparse: Read LD matrix

View source: R/readSparse.R

readSparseR Documentation

Read LD matrix

Description

Read in an LD matrix stored in a variety of file formats, and convert it to a sprase matrix.

Usage

readSparse(LD_path, as_sparse = TRUE, as_df = FALSE, verbose = TRUE, ...)

Arguments

LD_path

Path to LD matrix.

as_sparse

Convert the LD matrix to a sparse matrix.

as_df

Convert to the matrix to a data.frame.

verbose

Print messages.

...

Arguments passed on to downloadR::load_rdata

fileName

Name of the file to load.

Examples

LD_path <- tempfile(fileext = ".csv")
utils::write.csv(echodata::BST1_LD_matrix,
                 file = LD_path,
                 row.names = TRUE)
ld_mat <- readSparse(LD_path = LD_path)

RajLabMSSM/echoLD documentation built on May 12, 2024, 3:23 a.m.