correspond_between_two_rankings: Correspond two rankings

Description Usage Arguments Details Value Author(s) Examples

View source: R/correspond_rank.R

Description

Correspond two rankings

Usage

1
2
3
correspond_between_two_rankings(x1, x2, name1 = "", name2 = "",
    col1 = 2, col2 = 3, top_n = round(0.25*length(x1)), transparency = 0.9,
    pt_size = unit(1, "mm"), newpage = TRUE, ratio = c(1, 1, 1))

Arguments

x1

a vector of scores calculated by one metric.

x2

a vector of scores calculated by another metric.

name1

name of the first metric.

name2

name of the second metric.

col1

color of the lines for the first metric.

col2

color of the lines for the second metric.

top_n

top n elements to show correspondance.

transparency

transparency of the connection lines.

pt_size

size of the points, must be a unit object

newpage

whether to plot in a new graphic page.

ratio

ratio of width of the left plot, connection lines and right plot.

Details

In x1 and x2, the i^th element is the same object but with different scores under different metrics.

x1 and x2 are sorted in the left panel and right panel. The top n elements under corresponding metric are highlighted by vertical lines in both panels. Lines connect the same element with top values in either x1 or x2, and it shows e.g. the rank of the element by the second metric which has rank 1 by the first metric.

Under the plot is a simple Venn diagram showing the overlaps of the top n elements by the two metrics.

Value

No value is returned.

Author(s)

Zuguang Gu <[email protected]>

Examples

1
2
3
4
5
require(matrixStats)
mat = matrix(runif(1000), ncol = 10)
x1 = rowSds(mat)
x2 = rowMads(mat)
correspond_between_two_rankings(x1, x2, name1 = "sd", name2 = "mad", top_n = 20)

jokergoo/cola documentation built on Nov. 13, 2018, 1:22 p.m.