correspond_between_two_rankings {cola} | R Documentation

## Correspond two rankings

### Description

Correspond two rankings

### Usage

    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 for the first metric.
`col2` | Color for the second metric.
`top_n` | Top n elements to show the correspondance.
`transparency` | Transparency of the connecting 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 barplot, connection lines and right barplot. The three values will be scaled to a sum of 1.

### Details

In `x1` and `x2`, the i^th element in both vectors corresponds to the same object (e.g. same row if they are calculated from a matrix) but with different scores under different metrics.

`x1` and `x2` are sorted in the left panel and right panel respectively. The top n elements under corresponding metric are highlighted by vertical colored lines in both panels. The left and right panels also shown as barplots of the scores in the two metrics. Between the left and right panels, there are lines connecting the same element (e.g. i^th element in `x1` and `x2`) in the two ordered vectors so that you can see how a same element has two different ranks in the two metrics.

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 <z.gu@dkfz.de>

### Examples

    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)

[Package cola version 1.4.1 Index]