swap_3d_cc: Swap elements in a 3d array

Description Usage Arguments Value See Also Examples

View source: R/RcppExports.R

Description

This function swaps the elements in a three-dimensional array by using the scheme provided in the index matrix.

Usage

1
swap_3d_cc(values, index)

Arguments

values

An array of dimension M x r x K of values to swap.

index

An integer matrix of dimension M x K. containing the scheme by which values should be swapped.

Value

A three-dimensional array with swapped values.

See Also

Examples

1
2
3
values <- array(rnorm(40), dim = c(10, 2, 2))
index <- matrix(c(1,2), nrow = 10, ncol = 2)
swap_3d_cc(values, index)

simonsays1980/finmix documentation built on Dec. 23, 2021, 2:25 a.m.