calculateOverlap: Calculate Overlap

Description Arguments Details Author(s) References Examples

Description

Calculate the overlap between two groups.

Arguments

mat

The numerical vector.

groups

Defines the location of the groups within the vector.

...

Arguments to pass on.

Details

This function accepts a matrix containing data points for 2 groups where group 1 occupies the top half of the matrix and group 2, the bottom half. It calculates and returns the overlap between the 2 groups. Overlap in this case, is calculated dependant on the class of the mat argument. If the class of the mat argument is numeric and is one dimension form a makeMatrix matrix, then overlap refers to 100 * ((grp 1 points in grp2 range + grp2 points in grp1 range) / total number of points). If, on the other hand, the class of mat is makeMatrix then the percentage of intersecting area between the two groups is calculated.

Author(s)

Jason Serviss

References

https://en.wikipedia.org/wiki/Convex_hull

Examples

1
2
3
mat <- makeMatrix(x=c(0,1), y=c(1.1,2.1), dim=2, points=20)
groups <- makeGroups(mat, c("g1", "g2"))
calculateOverlap(mat, groups)

GranderLab/ClusterSignificanceExtras documentation built on May 6, 2019, 6:30 p.m.