Learn R Programming

pmartR (version 2.4.6)

custom_filter: Custom Filter Object

Description

This function creates a customFilt S3 object based on user-specified items to filter out of the dataset

Usage

custom_filter(
  omicsData,
  e_data_remove = NULL,
  f_data_remove = NULL,
  e_meta_remove = NULL,
  e_data_keep = NULL,
  f_data_keep = NULL,
  e_meta_keep = NULL
)

Value

An S3 object of class 'customFilt', which is a list with 3 elements for e_data, f_data, and e_meta, specifying which entries should be either kept or removed

Arguments

omicsData

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

e_data_remove

character vector specifying the names of the e_data identifiers to remove from the data. This argument can only be specified with other 'remove' arguments.

f_data_remove

character vector specifying the names of f_data identifiers to remove from the data. This argument can only be specified with other 'remove' arguments.

e_meta_remove

character vector specifying the names of the e_meta identifiers to remove from the data. This argument can only be specified with other 'remove' arguments.

e_data_keep

character vector specifying the names of the e_data identifiers to keep from the data. This argument can only be specified with other 'keep' arguments.

f_data_keep

character vector specifying the names of f_data identifiers to keep from the data. This argument can only be specified with other 'keep' arguments.

e_meta_keep

character vector specifying the names of the e_meta identifiers to keep from the data. This argument can only be specified with other 'keep' arguments.

Author

Kelly Stratton

Examples

Run this code
if (FALSE) { # requireNamespace("pmartRdata", quietly = TRUE)
library(pmartRdata)
to_filter <- custom_filter(omicsData = metab_object, 
                           e_data_remove = "fumaric acid",
                           f_data_remove = "Sample_1_Phenotype2_B")
summary(to_filter)

to_filter2 <- custom_filter(omicsData = metab_object, 
                            f_data_keep = metab_object$f_data$SampleID[1:10])
summary(to_filter2)
}

Run the code above in your browser using DataLab