modeSum-methods: Tensor Sum Across Single Mode

Description Usage Arguments Details Value See Also Examples

Description

Given a mode for a K-tensor, this returns the K-1 tensor resulting from summing across that particular mode.

Usage

1
2
3
4
modeSum(tnsr, m, drop)

## S4 method for signature 'Tensor'
modeSum(tnsr, m = NULL, drop = FALSE)

Arguments

tnsr

the Tensor instance

m

the index of the mode to sum across

drop

whether or not mode m should be dropped

Details

modeSum(tnsr,m=NULL,drop=FALSE)

Value

K-1 or K tensor, where K = [email protected]_modes

See Also

modeMean

Examples

1
2
tnsr <- rand_tensor()
modeSum(tnsr,3,drop=TRUE)

jamesyili/rTensor documentation built on May 17, 2017, 9:44 a.m.