collapse2mat: Converts array to matrix

Description Usage Arguments Examples

View source: R/collapse2mat.R

Description

Function to convert an array with at least 2 dimensions to a matrix. Either the first dimension (as rows) or the last (as columns) will be retained.

Usage

1
collapse2mat(x, first = FALSE)

Arguments

x

array with at more than two dimensions

first

logical, should first or last dimension be retained?

Examples

1
2
## should be 3, 20
dim(collapse2mat(array(NA, c(3,5,4)), first=TRUE))

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.