Description Usage Arguments Details Value Author(s) Examples

Reshapes a higher order array (tensor) into a matrix with a process known as m-mode flattening or matricization.

1 | ```
mFlatten(x, m)
``` |

`x` |
an |

`m` |
an integer between |

If the original tensor `x`

has the size *p_1 x ... x p_r x n*, then `mFlatten(x, m)`

returns tensor of size *p_m x p_1 ... p_{m - 1} p_{m + 1} ... p_r x n* obtained by gathering all *m*-mode vectors of `x`

into a wide matrix (an *m*-mode vector of `x`

is any vector of length *p_m* obtained by varying the *m*th index and holding the other indices constant).

The *m*-mode flattened 3rd order tensor of size *p_m x p_1 ... p_{m - 1} p_{m + 1} ... p_r x n*.

Joni Virta

1 2 3 4 5 6 7 8 9 10 11 12 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.