get_subset: Get subset based on indices

Description Usage Arguments Value Examples

Description

Get a subset of a vector or matrix based on a vector of (row) indices.

Usage

1

Arguments

x

Vector or matrix from which a subset is to be taken.

subset

Vector with indices of elements/rows to be selected.

Value

Subset of x.

Examples

1
2
ShadowCAT:::get_subset(c(1, 4, 2, 6, 3), subset = c(2, 5, 3))
ShadowCAT:::get_subset(matrix(c(1, 4, 2, 6, 3, 8, 6, 9, 0, 1), ncol = 2), subset = c(2, 5, 3))

Karel-Kroeze/ShadowCAT documentation built on May 7, 2019, 12:28 p.m.