Learn R Programming

SVEMnet (version 3.2.0)

plot.svem_significance_test: Plot SVEM significance test results for one or more responses

Description

Plots the Mahalanobis-like distances for original and permuted data from one or more SVEM significance test results returned by svem_significance_test_parallel().

Usage

# S3 method for svem_significance_test
plot(x, ..., labels = NULL)

Value

A ggplot2 object showing the distributions of distances for original vs. permuted data, grouped by response.

Arguments

x

An object of class svem_significance_test.

...

Optional additional svem_significance_test objects to include in the same plot.

labels

Optional character vector of labels for the responses. If not provided, the function uses inferred response names (from data_d$Response or x$response) and ensures uniqueness.

Details

If additional svem_significance_test objects are provided via ..., their distance tables ($data_d) are stacked and plotted together using a shared x-axis grouping of "Response / Source" and a fill aesthetic indicating "Original" vs "Permutation".