Learn R Programming

pmartR (version 2.4.6)

create_comparisonDF: Returns data frame with comparisons to be made

Description

The method creates a data frame containing the comparisons to be made when performing differential statistics.

Usage

create_comparisonDF(comp_type, omicsData, control_group = NULL)

Value

data frame with columns for Test and Control. Each row corresponds to a comparison of interest.

Arguments

comp_type

string specifying either "control" or "pairwise". Specifying "control" indicates that all other groups are to be compared to a single control group. Specifying "pairwise" indicates that all pairwise comparisons are to be made.

omicsData

A pmartR data object of any class, which has a `group_df` attribute created by the `group_designation()` function

control_group

string indicating the group to use for the control group. Only required when comp_type="control".

Author

Kelly Stratton

Details

This function takes in the omicsData and type of comparison, and returns a data frame where each row corresponds to a comparison of interest.

See Also

group_designation

Examples

Run this code
if (FALSE) { # requireNamespace("pmartRdata", quietly = TRUE)
library(pmartRdata)
mymetab <- group_designation(omicsData = metab_object, main_effects = "Phenotype")
create_comparisonDF(comp_type = "pairwise", omicsData = mymetab)

create_comparisonDF(comp_type = "control", omicsData = mymetab, control_group = "Phenotype1")
}

Run the code above in your browser using DataLab