plot-corRes: Plot corRes Object

plot.corResR Documentation

Plot corRes Object

Description

For plotting an S3 object of type 'corRes'

Usage

## S3 method for class 'corRes'
plot(
  x,
  omicsData = NULL,
  order_by = NULL,
  colorbar_lim = c(NA, NA),
  x_text = TRUE,
  y_text = TRUE,
  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 = "right",
  color_low = NULL,
  color_high = NULL,
  bw_theme = TRUE,
  use_VizSampNames = FALSE,
  ...
)

Arguments

x

An object of class "corRes" created via cor_result

omicsData

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

order_by

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

colorbar_lim

A pair of numeric values specifying the minimum and maximum values to use in the heat map color bar. Defaults to 'c(NA, NA)', in which case ggplot2 automatically sets the minimum and maximum values based on the correlation values in the data.

x_text

logical value. Indicates whether the x-axis will be labeled with the sample names. The default is TRUE.

y_text

logical value. Indicates whether the y-axis will be labeled with the sample names. The default is TRUE.

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. The default is 90.

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".

color_low

character string specifying the color of the gradient for low values

color_high

character string specifying the color of the gradient for high values

bw_theme

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

use_VizSampNames

logical value. Indicates whether to use custom sample names. The default is FALSE.

...

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)
mymetab <- edata_transform(omicsData = metab_object, data_scale = "log2")
mymetab <- group_designation(omicsData = mymetab, main_effects = "Phenotype")
my_correlation <- cor_result(omicsData = mymetab)
plot(my_correlation, omicsData = mymetab, order_by = "Phenotype")


myseq_correlation <- cor_result(omicsData = rnaseq_object)
plot(myseq_correlation)



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