chooseGroupingVariables: Choose a valid set of grouping variables from a targets/...

View source: R/accessory.R

chooseGroupingVariablesR Documentation

Choose a valid set of grouping variables from a targets/ experiment data frame.

Description

To be useful for grouping a variable needs to be a character or a factor, and to have a number of values greater than one but less than the number of samples.

Usage

chooseGroupingVariables(df)

Arguments

df

Input data frame

Value

out A list of valid column names

Examples

# `airway` contains info on the samples it's based on

require(airway)
data(airway, package = "airway")

# However, not all variables are useful for grouping data. Some have a
# different value for every sample, one has the same value for all of them.

colData(airway)

# So just pick the variables that ARE useful

chooseGroupingVariables(data.frame(colData(airway)))


pinin4fjords/shinyngs documentation built on Feb. 28, 2024, 10:19 a.m.