drop | R Documentation |
Delete the dimensions of a FlashR matrix which have only one level.
## S4 method for signature 'fm' drop(x)
x |
a FlashR matrix. |
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.
a FlashR matrix or vector.
mat <- fm.runif.matrix(100, 1) vec <- drop(mat)