sub-.binmapr: Subset method for binmapr objects

[.binmaprR Documentation

Subset method for binmapr objects

Description

This function subsets binmapr objects either by individual or by marker.

Usage

## S3 method for class 'binmapr'
x[i, j, by, ...]

Arguments

x

A binmapr object.

i

A numeric vector or logical vector to subset rows.

j

A numeric vector or logical vector to subset columns.

by

A character string to specify the subset method. Can be either "ind" (individual) or "mar" (marker).

...

Other arguments to be passed to the function.

Value

A subsetted binmapr object.

Examples

# Create a binmapr object
bm <- binmapr(...)
# Subset the binmapr object by individual
bm1 <- bm[1:5, , by="ind"]
# Subset the binmapr object by marker
bm2 <- bm[ , 1:5, by="mar"]

xuzhougeng/binmapr documentation built on Aug. 25, 2023, 6:44 a.m.