Learn R Programming

hypervolume (version 3.1.4)

hypervolume_overlap_statistics: Overlap statistics for set operations (Sorensen, Jaccard, etc.)

Description

Calculates overlap metrics for two hypervolumes

Usage

hypervolume_overlap_statistics(hvlist)

Value

A set of multiple metrics

jaccard

Jaccard similarity (volume of intersection of 1 and 2 divided by volume of union of 1 and 2)

sorensen

Sorensen similarity (twice the volume of intersection of 1 and 2 divided by volume of 1 plus volume of 2)

frac_unique_1

Unique fraction 1 (volume of unique component of 1 divided by volume of 1))

frac_unique_2

Unique fraction 2 (volume of unique component of 2 divided by volume of 2))

Arguments

hvlist

A set of hypervolumes calculated from hypervolume_set

Examples

Run this code
if (FALSE) {
data(penguins,package='palmerpenguins')
penguins_no_na = as.data.frame(na.omit(penguins))
penguins_adelie = penguins_no_na[penguins_no_na$species=="Adelie",
                    c("bill_length_mm","bill_depth_mm","flipper_length_mm")]
penguins_chinstrap = penguins_no_na[penguins_no_na$species=="Chinstrap",
                      c("bill_length_mm","bill_depth_mm","flipper_length_mm")]

hv1 = hypervolume_box(penguins_adelie,name='Adelie')
hv2 = hypervolume_box(penguins_chinstrap,name='Chinstrap')

hv_set <- hypervolume_set(hv1, hv2, check.memory=FALSE)

hypervolume_overlap_statistics(hv_set)
}

Run the code above in your browser using DataLab