compareSets: Compare two lists of sets

View source: R/general.purpuse.utilities.R

compareSetsR Documentation

Compare two lists of sets

Description

return matrix of set similarities defined by fun.

Usage

compareSets(l1, l2 = l1, fun = "o")

Arguments

l1

list of sets to be compared

l2

list of sets to be compared (compare l1 with itself if l2 is not set)

fun

function to calculate similarity or character. 'o' will result in intersect/min; 'j' in intersect/union

Details

Default is size of intersection divided by minimal size (overlap or Szymkiewicz–Simpson coefficient).

Value

matrix if length(l1),length(l2) size

Examples

compareSets(list(letters[1:6],1:5),list(letters[1:8],4:8,letters[4:10]),fun = 'j')

iaaka/visutils documentation built on Jan. 17, 2025, 11:29 p.m.