For plotting an S3 object of type 'rmdFilt'
# S3 method for rmdFilt
plot(
x,
pvalue_threshold = NULL,
sampleID = NULL,
order_by = NULL,
color_by = NULL,
interactive = FALSE,
hist = 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",
point_size = 3,
bw_theme = TRUE,
palette = NULL,
use_VizSampNames = FALSE,
...
)
ggplot2 plot object if interactive is FALSE, or plotly plot object if interactive is TRUE
object of class rmdFilt created via rmd_filter
numeric threshold for the Robust Mahalanobis Distance (RMD)
p-value. If sampleID
is NULL (see sampleID
below), a
horizontal line is plotted at the RMD value that corresponds with the
threshold, and all samples above the line have a p-value below the
threshold. If sampleID
is not NULL or hist
is TRUE,
. pvalue_threshold
will do nothing. Default value is NULL.
character vector specifying the sample names to be plotted. If specified, the plot function produces a boxplot instead of a scatterplot. A point, colored by sample, will be placed on each boxplot for that sample's value for the given metric. The default value is NULL.
character string specifying a variable by which to order
the samples in the plot. This variable must be found in the column names of
fdata from the rmdFilt object. If order_by
is "Group", the plot will
be ordered by the group variable from the group_designation function. If
NULL (default), the samples will be displayed in the order in which they
first appear. Only applicable where sampleID
= NULL and hist
= FALSE.
character string specifying a variable by which to order
the samples in the plot. This variable must be found in the column names of
fdata from the rmdFilt object. If color_by
is "Group" or NULL, the plot will
be colored by the group variable from the group_designation function. Only
applicable where sampleID
= NULL.
logical value. If TRUE produces an interactive plot.
boolean value that changes default scatter plot to a histogram displaying the distribution of all used RMD metrics.
character string specifying the x-axis label
character string specifying the y-axis label. The default is
NULL in which case the y-axis label will be the metric selected for the
metric
argument.
integer value indicating the font size for the x-axis. The default is 11.
integer value indicating the font size for the y-axis. The default is 11.
integer value indicating the angle of x-axis labels. The default is 90.
character string specifying the plot title.
integer value indicating the font size of the plot title. The default is 14.
character string specifying the legend title
character string specifying the position of the legend. Can be one of "right", "left", "top", "bottom", or "none". The default is "none".
An integer specifying the size of the points. The default is 3.
logical value. If TRUE uses the ggplot2 black and white theme.
character string indicating the name of the RColorBrewer
palette to use. For a list of available options see the details section in
RColorBrewer
.
logical value. Indicates whether to use custom sample names. The default is FALSE.
further arguments passed to or from other methods.
if (FALSE) { # requireNamespace("pmartRdata", quietly = TRUE)
library(pmartRdata)
mymetab <- edata_transform(omicsData = metab_object, data_scale = "log2")
mymetab <- group_designation(omicsData = mymetab, main_effects = "Phenotype")
rmd_results <- rmd_filter(omicsData = mymetab, metrics = c("MAD", "Skewness", "Correlation"))
plot(rmd_results, pvalue_threshold = 0.0001, order_by = "Phenotype")
}
Run the code above in your browser using DataLab