Skip to contents

Checks a matrix for duplicated columns, which reprent samples. Duplicate rows are allowed here, because many genes (rows) can contain all zeros.

Usage

hasUniqueCols(x)

Arguments

x

Object.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2019-08-10.

SummarizedExperiment

If the object is a SummarizedExperiment, then the primary assay matrix is checked for duplicated columns.

Examples

## TRUE ====
x <- matrix(data = seq_len(20L), ncol = 2L)
hasUniqueCols(x)
#> [1] TRUE

## FALSE ====
x <- matrix(data = rep(seq_len(10L), times = 2L), ncol = 2L)
hasUniqueCols(x)
#> [1] FALSE