Learn R Programming

strataG (version 2.0.2)

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.

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

schemes

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