sptensor-extract: Extract values from a sparse tensor

Description Usage Arguments

Description

There are multiple ways to provide indices for a sparse tensor. For example, if you have a three-dimensional tensor you can provide indices separated by a comma or a numeric vector of linear indices:

However for tensors with high dimensions this can be cumbersome to write. Therefore the tensor class also allows you to extract values with indices in matrix or list form, which are more suited for non-interactive coding.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## S4 method for signature 'sptensor,character,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,missing,character,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,character,character,ANY'
x[i, j, ...,
  drop = FALSE]

## S4 method for signature 'sptensor,missing,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,numeric,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,missing,numeric,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,numeric,numeric,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,list,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'sptensor,matrix,missing,ANY'
x[i, j, ..., drop = FALSE]

Arguments

x

sptensor object

i

numeric index, vector, list, or matrix

j

numeric index

...

additional numeric indices

drop

whether to drop dimensions


tensorr documentation built on May 2, 2019, 3:26 a.m.