plot_ksperms: Plot histogram of KS scores calculated via random...

Description Usage Arguments Value See Also Examples

View source: R/plots.R

Description

The permuted KS scores stored in ksobj$ks.perm are plotted as a histogram.

Usage

1
plot_ksperms(ksobj)

Arguments

ksobj

An KSomics object, typically returned via a call to calculate_ks.

Value

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

See Also

calculate_ks ggplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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_ks(dat, outcomes, nperm=10, parallel=FALSE)
plot_ksperms(results)

EMDomics documentation built on May 2, 2018, 2:07 a.m.