Learn R Programming

strataG (version 1.0.5)

strataSplit: Split Strata

Description

Return a list of gtypes for each stratum.

Usage

strataSplit(g, strata = NULL, remove.sequences = FALSE)

Arguments

g
a gtypes object.
strata
a character vector giving a subset of strata to select. If NULL then a list with all strata is created.
remove.sequences
logical. If TRUE any sequences not referenced in selected samples will not be in the returned object.

Value

A named list where each element is a gtypes object for a single stratum in g.

Examples

Run this code
data(msats.g)

# Proportion of unique alleles in each stratum
msats.list <- strataSplit(msats.g)
sapply(msats.list, propUniqueAlleles)

Run the code above in your browser using DataLab