Convert objects to sparse tensors
1 2 3 4 5 6 7 8 9 10 | as_sptensor(x, ...)
## S4 method for signature 'sptensor'
as_sptensor(x)
## S4 method for signature 'dtensor'
as_sptensor(x)
## S4 method for signature 'data.frame'
as_sptensor(x, valcol = NULL, dims = NULL)
|
x |
object |
... |
extra params |
valcol |
column to use for the tensor values. all other columns are treated as indices |
dims |
dimensions of tensor. If not provided, the maximum value for each of the indices is used. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.