SelIndices: Slices A Matrix Along A Dimension

View source: R/SelIndices.R

SelIndicesR Documentation

Slices A Matrix Along A Dimension

Description

This function selects a subset of ensemble members from an array containing any number of dimensions.

Usage

SelIndices(var, posdim, limits)

Arguments

var

An array with any number of dimensions.

posdim

The dimension along which the ensemble subset should be selected.

limits

The lower and upper limits for the selection of ensemble members along the posdim dimension.

Value

The subsetted array.

Author(s)

History:
0.1 - 2011-04 (V. Guemas) - Original code
1.0 - 2013-09 (N. Manubens) - Formatting to CRAN

Examples

a <- array(rnorm(24), dim = c(2, 3, 4, 1))
print(a)
print(a[, , 2:3, ])
print(dim(a[, , 2:3, ]))
print(SelIndices(a, 3, c(2, 3)))
print(dim(SelIndices(a, 3, c(2, 3))))


s2dverification documentation built on April 20, 2022, 9:06 a.m.