concat_outputs: Concatenate multiple outputs with multiple observations

View source: R/util.R

concat_outputsR Documentation

Concatenate multiple outputs with multiple observations

Description

Concatenate multiple outputs with multiple observations.

Usage

concat_outputs(outputlist, centscal = "none")

Arguments

outputlist

List of outputs. Each output is a n x m matrix, where n is the number of observations and m is the number of variables (i.e. output length).

centscal

Centering and scaling method: "center", "auto", "range", "iqrange", "vast", "pareto", "level" or "none". This task is delegated to the centerscale function.

Value

An n x p matrix, representing the n observations of the concatenated output, each observation of length p, which is the sum of individual output lengths.

Examples


# Collect 20 observations of 3 outputs with different scales and lengths

# Output 1, length 100
out1 <- matrix(rnorm(2000, mean = 0, sd = 1), nrow = 20)

# Output 2, length 200
out2 <- matrix(rnorm(4000, mean = 100, sd = 200), nrow = 20)

# Output 1, length 50
out3 <- matrix(rnorm(1000, mean = -1000, sd = 10), nrow = 20)

# Concatenate and range scale outputs, resulting matrix dimensions will be
# 20 x 350
outconcat <- concat_outputs(list(out1, out2, out3), "range")

fakenmc/micompr documentation built on Aug. 6, 2024, 8:29 p.m.