Learn R Programming

tensorFun (version 0.1.1)

refold: Tensor refolding

Description

Performing tensorization, which is the inverse process of unfolding

Usage

refold(unfolding, k, dim_vec)

Value

A multi-dimensional array

Arguments

unfolding

A multi-dimensional array

k

An integer specifying the mode of array to unfold

dim_vec

A vector specifying the expected dimension of output array

Examples

Run this code
refold(matrix(1:9,nrow=3), 1, c(3,1,3))

Run the code above in your browser using DataLab