outlying_elements: Extract the outlying elements from each set pair

View source: R/visuals.R

outlying_elementsR Documentation

Extract the outlying elements from each set pair

Description

This function detects the outlying elements of each pair of sets in a HierarchicalSet object. An outlying element is defined as an element in the intersection of the two sets, but not in the intersection of their nearest common set family in the hierarchy.

Usage

outlying_elements(x, counts = TRUE)

Arguments

x

A HierarchicalSet object

counts

Should number of elements rather than the actual elements be returned. Defaults to TRUE

Value

A data.frame containing information on the outlying elements of each set pair. Only pairs with outlying elements are returned. The 'setX' coloumn contains the index of the first set in the pair and the 'setY' column contains the index of the second set in the pair. If counts = TRUE then the 'nOutliers' column contains the number of outlying elements for each pair. If counts = FALSE the the 'outlier' column contains the index of the outlying elements for each pair

See Also

plot_outlier_distribution() for plotting the distribution of outlying elements in a HierarchicalSet object

Examples

data('twitter')

twitSet <- create_hierarchy(twitter)

# Just get the counts
countOut <- outlying_elements(twitSet)
head(countOut)

# Or the actual elements
elemOut <- outlying_elements(twitSet, FALSE)
head(elemOut)


hierarchicalSets documentation built on April 24, 2023, 5:06 p.m.