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

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

# S4 method for 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.

Value

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

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.

Examples

set.seed(123)
mdf <- makeExampleMatchedDataSet(matched = TRUE)
head(indices(mdf))
#> [1] 6100 5198 9886 3619 9077 6763

head(indices(mdf, set = 'focal'))
#> [1] 1 2 3 4 5 6
head(indices(mdf, set = 'pool'))
#> [1] 1 2 3 4 5 6
head(indices(mdf, set = 'matched'))
#> [1] 6100 5198 9886 3619 9077 6763
head(indices(mdf, set = 'unmatched'))
#> [1] 1 2 3 4 5 6