getIndices: Get indices of object elements.

Description Usage Arguments Value

View source: R/util.R

Description

Get the indices of an object, as constrained by the requested parameter. If using this function without requested constraints, consider using the faster primitive R function seq_along instead.

Usage

1
2
3
4
5
6
7
getIndices(x, requested = NULL, strict = FALSE)

## Default S3 method:
getIndices(x, requested = NULL, strict = FALSE)

## S3 method for class 'qtl'
getIndices(x, requested = NULL, strict = FALSE)

Arguments

x

An object with elements that are accessible by an index.

requested

A character vector of names, a logical vector of the same length as the input object, or a numeric vector containing indices of the input object. If this parameter is not specified, all indices are returned.

strict

Option indicating that requested, if specified, must be in the same order as the corresponding elements of the input object.

Value

Integer vector of object indices.


gact/shmootl documentation built on Nov. 11, 2021, 6:23 p.m.