Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

randIndFx

Distance of categorical data (Jaccard,Rand and adjusted Rand index)


Description

randIndFx calculates distance of categorical data (as Rand Index, Adjusted Rand Index or Jaccard Index). Note: uses/requires package flexclust Methods so far available (via flexclust): "ARI" .. adjusted Rand Index, "RI" .. Rand index, "J" .. Jaccard, "FM" .. Fowlkes-Mallows.

Usage

randIndFx(ma, method = "ARI", adjSense = TRUE, silent = FALSE, callFrom = NULL)

Arguments

ma

(matrix) main input for distance calulation

method

(character) name of distance method (eg "ARI","RI","J","FM")

adjSense

(logical) allows introducing correlation/anticorrelation (interprete neg distance results as anti)

silent

(logical) suppres messages

callFrom

(character) allow easier tracking of message(s) produced

Value

distance matrix

See Also

comPart in randIndex

Examples

set.seed(2016); tab2 <- matrix(sample(1:2,size=42,replace=TRUE),ncol=7)
flexclust::comPart(tab2[1,],tab2[2,])
flexclust::comPart(tab2[1,],tab2[3,])
flexclust::comPart(tab2[1,],tab2[4,])
  randIndFx(tab2,adjS=FALSE)
  cor(t(tab2))
  randIndFx(tab2,adjS=TRUE)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.