valid_indices: Determine valid indices

View source: R/valid_indices.R

valid_indicesR Documentation

Determine valid indices

Description

Function to determine valid indices in a candidate vector

Usage

valid_indices(idx, n)

Arguments

idx
  • vector of "candidate" indices

n
  • max valid index

Details

Valid indices into another vector are assumed to run from 1 to n. The function returns the vector of valid indices, given n, in the input vector idx.

Value

vector of valid indices, in order they occur in idx


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.