flatten2ranger: Flatten multi-modal data for ranger calls.

View source: R/utils.R

flatten2rangerR Documentation

Flatten multi-modal data for ranger calls.

Description

Produces a flat matrix from data, a potentially 3-dimensional array. The column names of the new matrix are produced by pasting the dimnames together, using sep as separator.

Usage

flatten2ranger(data, cols, sep = "$")

Arguments

data

matrix or 3D array. The data to flatten.

cols

vector. The (optional) columns to use.

sep

string. A separator to use when building the new column names.

Value

A matrix containing data reduced to cols, with the third dimension inserted as extra columns.


pievos101/DFNET documentation built on Dec. 1, 2022, 3:44 p.m.