add_max_feature: Assign samples to a new group variable based on the highest...

View source: R/group.r

add_max_featureR Documentation

Assign samples to a new group variable based on the highest feature

Description

Assign samples to a new group variable based on the highest feature

Usage

add_max_feature(data, group = ".group", reorder.samples = TRUE,
  top.n = NULL)

Arguments

data

ExpressionSet object.

group

name of new grouping variable.

reorder.samples

If TRUE, samples are reordered by the prevalance of their assigned group and rank of the assigned feature's value within the group.

top.n

Limit the number of levels in the new grouping variable to the top.n most prevalent. Samples not among the most prevalent groups are assigned to "Othere".

Examples

profiles <- add_max_feature(profiles, group = "enterotype")
profiles$enterotype


aaronwolen/metafiler documentation built on Feb. 16, 2024, 12:41 a.m.