dtensor: Construct a dense tensor

Description Usage Arguments See Also Examples

Description

Construct a dtensor from a multi-dimensional array.

Usage

1
2
3
4
5
6
7
dtensor(x)

## S4 method for signature 'array'
dtensor(x)

## S4 method for signature 'numeric'
dtensor(x)

Arguments

x

n-dimensional R array

See Also

dtensor-class for class documentation.

Examples

1
2
3
# A 2x2x2 dense tensor
arr <- array(data = c(1,0,0,0,1,0,0,0) , dim = c(2,2,2))
X <- dtensor(arr)

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