hs-get: Getters for HierarchicalSet objects

HierarchicalSet-gettersR Documentation

Getters for HierarchicalSet objects

Description

These utility functions makes it easy to extract raw information from a HierarchicalSet object.

Usage

sets(x)

clusters(x)

set_names(x)

element_names(x)

n_sets(x)

n_elements(x)

n_clusters(x)

cluster_sizes(x)

set_sizes(x)

cluster_members(x)

set_membership(x)

Arguments

x

A HierarchicalSet object

Details

sets Returns a ngCMatrix with sets as columns and elements as rows.

clusters returns a list of dendrograms with the clustering in the HierarchicalSet object

set_names returns a character vector with the names of the sets.

element_names returns a character vector with the names of the elements

n_sets returns the number of sets

n_elements returns the number of elements

n_clusters returns the number of independent set families

cluster_sizes returns the number of sets in each independent set family

set_sizes returns the number of elements in each set

cluster_members returns the members of each independent set family

set_membership returns the cluster each set is member of

Value

depending on the function. See details

Examples

data('twitter')

twitSet <- create_hierarchy(twitter)

# Get the sets as a presence/absence matrix
head(sets(twitSet))

# Get the clustering of the HierarchicalSet object
clusters(twitSet)

# Get the set names
set_names(twitSet)

# Get the element names or NULL if they are unnamed
element_names(twitSet)

# Get the number of sets
n_sets(twitSet)

# Get the number of elements
n_elements(twitSet)

# Get the number of independent clusters
n_clusters(twitSet)

# Get the size of each independent clusters
cluster_sizes(twitSet)

# Get the size of each set
set_sizes(twitSet)

# Get the members of each independent clusters
cluster_members(twitSet)

# Get the membership of each set
set_membership(twitSet)


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