Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

batch_cols

Batch columns by pattern of missing values


Description

Identify batches of columns of a matrix that have the same pattern of missing values.

Usage

batch_cols(mat, max_batch = NULL)

Arguments

mat

A numeric matrix

max_batch

Maximum batch size

Value

A list containing the batches, each with two components: cols containing numeric indices of the columns in the corresponding batch, and omit containing a vector of row indices that have missing values in this batch.

See Also

Examples

x <- rbind(c( 1,  2,  3, 13, 16),
           c( 4,  5,  6, 14, 17),
           c( 7, NA,  8, NA, 18),
           c(NA, NA, NA, NA, 19),
           c(10, 11, 12, 15, 20))
batch_cols(x)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.