array_operator: Array operator to mimic different-dimension-array...

View source: R/array_operator.R

array_operatorR Documentation

Array operator to mimic different-dimension-array element-wise operations in MATLAB. It receives as input two arrays of potentially different dimensions, it resizes them to have same dimensions and finally performs the element-wise operation.

Description

Array operator to mimic different-dimension-array element-wise operations in MATLAB. It receives as input two arrays of potentially different dimensions, it resizes them to have same dimensions and finally performs the element-wise operation.

Usage

array_operator(array1, array2, operation)

Arguments

array1

The first array

array2

The second array

operation

The operation. It can take values: '+', '-', '*', '/' and '^'

Value

An array with dimensions equal to the "largest" input array. It is the result of applying the operator element-wise to both input arrays.


davidzarruk/IGCities documentation built on Sept. 28, 2024, 11:36 a.m.