Learn R Programming

gwasrapidd (version 0.99.17)

subset-variants: Subset a variants object

Description

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

Usage

# S4 method for variants,missing,missing,missing
[(x, i, j, ..., drop = FALSE)

# S4 method for variants,numeric,missing,missing [(x, i, j, ..., drop = FALSE)

# S4 method for variants,character,missing,missing [(x, i, j, ..., drop = FALSE)

Value

A variants object.

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.

Examples

Run this code
# 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]

Run the code above in your browser using DataLab