strataG (version 2.4.905)

stratify: Stratify gtypes

Description

Choose a new stratification scheme from the schemes slot in a '>gtypes object.

Usage

stratify(g, scheme = NULL, drop = TRUE)

Arguments

g

a '>gtypes object.

scheme

either the column name of a stratification scheme stored in the data.frame of the schemes slot of g, or a vector or factor identifying which stratum each sample belongs to. If NULL, all individuals are assigned to a single stratum named "Default".

drop

remove samples not assigned to a stratum? (those assigned NA in stratification scheme)

Value

A new '>gtypes object with an updated strata slot.

See Also

getSchemes

Examples

Run this code
# NOT RUN {
data(msats.g)
msats.g

broad.msats <- stratify(msats.g, "broad")
broad.msats

# }

Run the code above in your browser using DataLab