Learn R Programming

strataG (version 1.0.3)

idRows: gtypes ID Rows

Description

Return row numbers of @loci slot for a set of sample ids.

Usage

idRows(ids, rowNames)

Arguments

ids
character vector of sample ids.
rowNames
a vector of rownames from the @loci slot of a gtypes object.

Value

  • a vector of row numbers in g@loci where data for ids are stored.

Examples

Run this code
data(msats.g)

ran.ids <- sample(indNames(msats.g), 5)
idRows(ran.ids, rownames(loci(msats.g)))

Run the code above in your browser using DataLab