Learn R Programming

EMDomics (version 2.2.2)

plot_emdperms: Plot histogram of EMD scores calculated via random permutation.

Description

The permuted EMD scores stored in emdobj$emd.perm are plotted as a histogram.

Usage

plot_emdperms(emdobj)

Arguments

emdobj
An EMDomics object, typically returned via a call to calculate_emd.

Value

A ggplot object is returned. If the value is not assigned, a plot will be drawn.

See Also

calculate_emd ggplot

Examples

Run this code
# 100 genes, 100 samples
dat <- matrix(rnorm(10000), nrow=100, ncol=100)
rownames(dat) <- paste("gene", 1:100, sep="")
colnames(dat) <- paste("sample", 1:100, sep="")

# "A": first 50 samples; "B": next 30 samples; "C": final 20 samples
outcomes <- c(rep("A",50), rep("B",30), rep("C",20))
names(outcomes) <- colnames(dat)

results <- calculate_emd(dat, outcomes, nperm=10, parallel=FALSE)
plot_emdperms(results)

Run the code above in your browser using DataLab