subset.genotypes: Subset a 'genotypes' object by markers or samples

Description Usage Arguments Value Warning

Description

Subset a genotypes object by markers or samples

Usage

1
2
## S3 method for class 'genotypes'
subset(x, expr, by = c("markers", "samples"), ...)

Arguments

x

a genotypes object

expr

logical expression indicating elements or rows to keep: missing values are taken as false (just like subset.data.frame())

by

should expr be evaluated in the context of markers (eg. by rows) or samples (eg. by columns)?

...

ignored

Value

a genotypes object similar to x, but with only the selected rows (by == "markers") or columns (by == "samples"). Attributes of x including intensity matrices, filters, marker map and sample metadata are all adjusted accordingly.

Warning

Since this function uses non-standard evaluation, be careful about expressions which include variables defined in both the global environment and in the scope of the call (eg. variables named same as columns of the marker map). In that case results may not be what you expect.


andrewparkermorgan/argyle documentation built on May 10, 2019, 11:08 a.m.