split_mat: Split a matrix into blocks

View source: R/io.R

split_matR Documentation

Split a matrix into blocks

Description

This function splits a large matrix into smaller blocks with cols_per_chunk columns per block, and saves them as .rds files with prefix prefix

Usage

split_mat(mat, cols_per_chunk, prefix, overwrite = TRUE, verbose = TRUE)

Arguments

mat

The matrix to be split

cols_per_chunk

Number of columns per block

prefix

Prefix of output files

overwrite

Overwrite existing files (default TRUE)

verbose

Print progress updates

See Also

packedancestrymap_to_afs, afs_to_f2

Examples

## Not run: 
afdat = packedancestrymap_to_afs('path/to/packedancestrymap_prefix', allpopulations)
split_mat(afdat$afs, cols_per_chunk = 20, prefix = 'afdat_split_v42.1/afs')

## End(Not run)

uqrmaie1/admixtools documentation built on Nov. 3, 2024, 12:56 a.m.