plot.emetaFilt: Default plot method for emetaFilt

View source: R/filter_plot_methods.R

plot.emetaFiltR Documentation

Default plot method for emetaFilt

Description

Default plot method for emetaFilt

Usage

## S3 method for class 'emetaFilt'
plot(
  x,
  min_val = NA,
  max_val = NA,
  cats = NA,
  na.rm = TRUE,
  title = NA,
  xlabel = attr(x, "cname"),
  ylabel = "Count",
  ...
)

Arguments

x

object of class emeta_filter

min_val

a numeric value specifying the minimum value (inclusive) that a peak should have for the specified 'e_meta' column

max_val

a numeric value specifying the maximum value (inclusive) that a peak should have for the specified 'e_meta' column

cats

a vector of character values specifying the level(s) of the specified 'e_meta' column which should be retained

na.rm

logical value specifying if peaks with NA values for the specified 'e_meta' column should be removed. Default value is TRUE

title

plot title

xlabel

x-axis label, default is the column of emeta used to construct x

ylabel

y-axis label

...

other arguments

Value

plotly plot object

Examples

## Not run: 
# Emeta filter based on the "OtoC_ratio" column (numeric variable)
filter_object1 = emeta_filter(exampleProcessedPeakData, cname = "OtoC_ratio")

# Plots the distribution of OtoC_ratio
plot(filter_object1)

# Demonstrates retaining values between 0.5 and 1
plot(filter_object1, min_val = 0.5, max_val = 1)

# Emeta filter based on the "MolForm" column (categorical variable)
filter_object2 = emeta_filter(exampleProcessedPeakData, cname = "MolForm")

# Only non-NAs retained
plot(filter_object2)

# Peaks matching "C10" retained
plot(filter_object2, cats=grep("C10", filter_object2$emeta_value, value = TRUE))

## End(Not run)

EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.