Learn R Programming

tensorr (version 0.1.1)

as_sptensor: Convert objects to sparse tensors

Description

Convert objects to sparse tensors

Usage

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)

Arguments

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.