group_designation: Creates Data Frame for Group Membership Based on Specified...

Description Usage Arguments Details Value Author(s) Examples

Description

The method assigns each sample to a group, for future analyses, based on the variable(s) specified as main effects.

Usage

1
2
group_designation(omicsData, main_effects, covariates = NULL,
  time_course = NULL)

Arguments

omicsData

an object of the class 'lipidData', 'metabData', 'pepData', or 'proData', usually created by as.lipidData, as.metabData, as.pepData, or as.proData, respectively.

main_effects

a character vector with no more than two variable names that should be used as main effects to determine group membership of samples. The variable name must match a column name from f_data.

covariates

a character vector of no more than two variable names that should be used as covariates in downstream analyses. Covariates are typically variables that a user wants to account for in the analysis but quantifying/examining the effect of the variable is not of interest.

time_course

an optional character string specifying the variable name of a time course variable, if applicable to the experimental data.

Details

Groups are formed based on the levels of the main effect variables. One or two main effect variables are allowed. In the case of two main effect variables, groups are formed based on unique combinations of the levels of the two main effect variables. Any samples with level NA for a main effect variable will be removed from the data and will not be included in the final group designation results. Any groups with less than 2 samples will be designated to group NA and the affected sample(s) will be removed from the data.

Value

An object of the same class as the input omicsData object - the provided object with the samples filtered out, if any NAs were produced in designating groups. An attribute 'group_DF', a data.frame with columns for sample id and group, is added to the object. If two main effects are provided the original main effect levels for each sample are returned as the third and fourth columns of the data.frame. If time_course is included, a column for 'TimeCourse' will be output as well. Additionally, the covariates provided will be listed as attributes of this data.frame.

Author(s)

Lisa Bramer, Kelly Stratton

Examples

1
2
3
4
5
6
dontrun{
library(pmartRdata)
data(lipid_object)
lipid_object2 <- group_designation(omicsData = lipid_object, main_effects = "Condition")
attr(lipid_object2, "group_DF")
}

pmartR/pmartRmems documentation built on May 29, 2019, 4:52 p.m.