subset-variants: Subset a variants object

subset-variantsR Documentation

Subset a variants object

Description

You can subset variants by identifier or by position using the `[` operator.

Usage

## S4 method for signature 'variants,missing,missing,missing'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'variants,numeric,missing,missing'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'variants,character,missing,missing'
x[i, j, ..., drop = FALSE]

Arguments

x

A variants object.

i

Position of the identifier or the name of the identifier itself.

j

Not used.

...

Additional arguments not used here.

drop

Not used.

Value

A variants object.

Examples

# Subset a variants object by identifier
variants_ex01['rs4725504']

# Or by its position in table variants
variants_ex01[3]

# Keep all variants except the third
variants_ex01[-3]


ramiromagno/gwasrapidd documentation built on Jan. 3, 2024, 10:21 p.m.