remove: Remove samples, classes or features

removeClassesR Documentation

Remove samples, classes or features

Description

Exclusion of samples, classes or features from an AnalysisData object.

Usage

removeClasses(d, cls = "class", classes = c())

## S4 method for signature 'AnalysisData'
removeClasses(d, cls = "class", classes = c())

removeFeatures(d, features = character())

## S4 method for signature 'AnalysisData'
removeFeatures(d, features = character())

removeSamples(d, idx = "fileOrder", samples = c())

## S4 method for signature 'AnalysisData'
removeSamples(d, idx = "fileOrder", samples = c())

Arguments

d

S4 object of class AnalysisData

cls

info column to use for class information

classes

classes to remove

features

features to remove

idx

info column containing sample indexes

samples

sample indexes to remove

Value

An S4 object of class AnalysisData with samples, classes or features removed.

Methods

  • removeClasses: Remove classes.

  • removeFeatures: Remove features.

  • removeSamples: Remove samples.

Examples

library(metaboData)
 d <- analysisData(abr1$neg[,200:300],abr1$fact)
 
 ## Remove classes
 d %>% 
  removeClasses(cls = 'day',classes = 'H')
 
 ## Remove features
 d %>% 
  removeFeatures(features = c('N200','N201'))
 
 ## Remove samples
 d %>% 
  removeSamples(idx = 'injorder',samples = c(1,10))

jasenfinch/metabolyseR documentation built on Sept. 18, 2023, 1:25 a.m.