indices {nullranges} | R Documentation

## Get indices of matched set

### Description

Extracts the indices of a specified matched set from a Matched object.

### Usage

    indices(x, set = "matched", ...)

    ## S4 method for signature 'Matched'
    indices(x, set)

### Arguments

`x` | Matched object.
`set` | A character string describing from which set to extract indices. can be one of 'focal', 'matched', 'pool', or 'unmatched'.
`...` | Additional arguments.

### Details

Indices from 'focal' come from the `focal` set of `matchRanges()` used to construct the `Matched` object while indices from 'matched', 'pool', and 'unmatched' come from the `pool` set. Default returns the 'matched' indices from the `pool` set.

### Value

An integer vector corresponding to the indices in the `focal` or `pool` which comprise the "focal" or c("matched", "pool", "unmatched") sets.

### Examples

    set.seed(123)
    mdf <- makeExampleMatchedDataSet(matched = TRUE)
    head(indices(mdf))

    head(indices(mdf, set = 'focal'))
    head(indices(mdf, set = 'pool'))
    head(indices(mdf, set = 'matched'))
    head(indices(mdf, set = 'unmatched'))

[Package nullranges version 1.0.1 Index]