fmriu.list2array: Reorganize a list of graphs to an array of graphs

Description Usage Arguments Value See Also Examples

Description

fmriu.list2array uses abind to reshape a list of same-dimension graphs to an array. Takes from list[[listels]] to array[,,length(listels)].

Usage

1
fmriu.list2array(list_in, flatten = FALSE)

Arguments

list_in

a list with p elements of dimensions [n x m].

flatten=FALSE

whether to flatten the elements. The output will be of dimensions:

TRUE

output array will be [p x (n*m)]

FALSE

output array will be [p x n x m]

Value

array_out an array of dimensions depending on the flatten parameter.

See Also

abind array2list aperm

Examples

1
2
3
4
5
test <- list()
test[[1]] <- matrix(1:35, nrow=5, ncol=7)
test[[2]] <- matrix(36:70, nrow=5, ncol=7)
test[[3]] <- matrix(71:105, nrow=5, ncol=7)
fmriu.list2array(test)  # has dimensions [3, 5, 7]

neurodata/fmriutils documentation built on May 14, 2019, 2:30 p.m.