Description Usage Arguments Details Value Note for Developers Author(s) See Also Examples
WARNING: This is intended for developers and not end-users; see ‘Note for Developers’.
1 |
x |
A matrix-like object, e.g., |
return_class |
The class of the returned object. |
... |
Additional arguments, for use in specific methods. |
A generic function to sparsify a matrix-like object, e.g.,
matrix
, data.frame
, or
data.table
.
While the concepts of "sparsify" and "densify" are inverse
operations, in general, identical(densify(sparsify(x)), x)
is
FALSE
. This is because the return value of sparsify()
is generally not compatible with the signature of a
densify()
method.
An object with the concepts of a key
and a value
. The
specific return value is left to individual methods. For example, the
sparsify,SimpleList,matrix-method
returns a
SimpleList object with an integer
key
element and a matrix
value
element.
This generic and method are used internally by the
SparseSummarizedExperiment package but are not intended for use by
end-users. End-users with their data as dense matrix
objects should use the SparseAssays
constructor in conjunction
with the associated combine
method to sparify their data and
return a valid SparseAssays object.
One particular word of warning, the 'value' element returned by
sparsify
may contain the NA
-row and will not have NA
s
in the 'key' element.
Peter Hickey, peter.hickey@gmail.com
SimpleListSparseAssays
1 | # See ?SimpleListSparseAssays
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.