Convert objects to sparse tensors
as_sptensor(x, ...) # S4 method for sptensor as_sptensor(x) # S4 method for dtensor as_sptensor(x) # S4 method for 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. |