ff (version 2.2-14)

array2vector: Array: make vector from array

Description

Makes a vector from an array respecting dim and dimorder

Usage

array2vector(x, dim = NULL, dimorder = NULL)

Arguments

x
dim
dimorder

Value

a vector

Details

This is the inverse function of vector2array. It extracts the vector from the array by first moving through the fastest rotating dimension dim[dimorder[1]], then dim[dimorder[2]], and so forth

See Also

vector2array, arrayIndex2vectorIndex

Examples

Run this code
# NOT RUN {
  array2vector(matrix(1:12, 3, 4))
  array2vector(matrix(1:12, 3, 4, byrow=TRUE), dimorder=2:1)
# }

Run the code above in your browser using DataLab