plot-nmrnormRes: Plot nmrnormRes Object

plot.nmrnormResR Documentation

Plot nmrnormRes Object

Description

Creates a scatter plot for an S3 object of type 'nmrnormRes'

Usage

## S3 method for class 'nmrnormRes'
plot(
  x,
  nmrData = NULL,
  order_by = NULL,
  color_by = NULL,
  interactive = FALSE,
  x_lab = NULL,
  y_lab = NULL,
  x_lab_size = 11,
  y_lab_size = 11,
  x_lab_angle = 90,
  title_lab = NULL,
  title_lab_size = 14,
  legend_lab = NULL,
  legend_position = "none",
  point_size = 2,
  bw_theme = TRUE,
  palette = NULL,
  ...
)

Arguments

x

an object of type nmrnormRes, created by normalize_nmr

nmrData

An nmrData object.

order_by

A character string specifying a column in f_data by which to order the samples.

color_by

A character string specifying a column in f_data by which to color the points.

interactive

logical value. If TRUE produces an interactive plot.

x_lab

character string specifying the x-axis label

y_lab

character string specifying the y-axis label

x_lab_size

integer value indicating the font size for the x-axis. The default is 11.

y_lab_size

integer value indicating the font size for the y-axis. The default is 11.

x_lab_angle

integer value indicating the angle of x-axis labels.

title_lab

character string specifying the plot title.

title_lab_size

integer value indicating the font size of the plot title. The default is 14.

legend_lab

character string specifying the legend title.

legend_position

character string specifying the position of the legend. Can be one of "right", "left", "top", "bottom", or "none". The default is "none".

point_size

integer specifying the size of the points. The default is 2.

bw_theme

logical value. If TRUE uses the ggplot2 black and white theme.

palette

character string indicating the name of the RColorBrewer palette to use. For a list of available options see the details section in RColorBrewer.

...

further arguments passed to or from other methods.

Value

ggplot2 plot object if interactive is FALSE, or plotly plot object if interactive is TRUE

Examples


library(pmartRdata)
mynmr <- edata_transform(omicsData = nmr_identified_object, data_scale = "log2")
mynmrnorm <- normalize_nmr(
  omicsData = mynmr,
  apply_norm = FALSE,
  metabolite_name = "unkm1.53"
)
plot(mynmrnorm)

mynmrnorm2 <- normalize_nmr(
  omicsData = mynmr,
  apply_norm = FALSE,
  sample_property_cname = "Concentration"
)
plot(mynmrnorm2)


pmartR/pmartR documentation built on March 4, 2024, 8:32 a.m.