CAT: CAT

CATR Documentation

CAT

Description

For the i top-ranked members of each list, concordance is defined as length(intersect(vec1[1:i],vec2[1:i]))/i.

Usage

CAT(vec1, vec2, maxrank = min(length(vec1), length(vec2)))

Arguments

vec1, vec2

Two numeric vectors, for computing concordance. If these are numeric vectors with names, the numeric values will be used for sorting and the names will be used for calculating concordance. Otherwise, they are assumed to be already-ranked vectors, and the values themselves will be used for calculating concordance.

maxrank

Optionally specify the maximum size of top-ranked items that you want to plot.

Value

a data.frame with two columns: rank containing the length of the top lists and concordance which is the fraction in common that the two provided lists have in the top rank items.

See Also

createConcordance.

Examples

vec1 <- c("A" = 10, "B" = 5, "C" = 20, "D" = 15)
vec2 <- c("A" = 1, "B" = 2, "C" = 3, "D" = 4)

CAT(vec1, vec2)

mcalgaro93/benchdamic documentation built on March 10, 2024, 10:40 p.m.