dropR Documentation

Drop Redundant Extent Information

Description

Delete the dimensions of a FlashR matrix which have only one level.

Usage

## S4 method for signature 'fm'
drop(x)

Arguments

x

a FlashR matrix.

Details

If the input matrix has only one row or one column, it works the same as fm.as.vector. Otherwise, it returns the original matrix.

Value

a FlashR matrix or vector.

Examples

mat <- fm.runif.matrix(100, 1)
vec <- drop(mat)