count_pairs: Count pairs

View source: R/count_pairs.R

count_pairsR Documentation

Count pairs

Description

Description of the count pairs function.

Usage

count_pairs(a, b, order)

Arguments

a

a vector of classifications

b

a vector of classifications

order

a vector of permutations (coming from the order() function in base R)

Details

A function to count pairs of integers or factors and identify the pair counts

Value

a list of five different vectors:

  • pair_nb: a vector containing counts of nodes within all possible classification pairs from partitions a and b

  • pair_a: a vector of the same length as pair_nb, specifying the order of classifications in pair_nb from partition a

  • pair_b: a vector of the same length as pair_nb, specifying the order of classifications in pair_nb from partition b

  • a_nb: a vector containing counts of nodes within each class for partition a

  • b_nb: a vector containing counts of nodes within each class for partition b


CommKern documentation built on Sept. 23, 2022, 5:07 p.m.