The ?scuttle::downsampleMatrix documentation states:
By default, the output format will be a dense matrix for an ordinary matrix ‘x’, and a sparse matrix for any sparse format (i.e., if ‘is_sparse(x)’ returns ‘TRUE’).
However, I get a sparse result for a dense input in scuttle_1.14.0:
scuttle::downsampleMatrix(matrix(1000), prop=0.5)
# 1 x 1 sparse Matrix of class "dgCMatrix"
#
# [1,] 500
It seems that either the behavior or the documentation is wrong here.
The
?scuttle::downsampleMatrixdocumentation states:However, I get a sparse result for a dense input in
scuttle_1.14.0:It seems that either the behavior or the documentation is wrong here.