Learn R Programming

hierarchicalSets (version 1.0.4)

format_sets: Parse different set formats into ngCMatrix format

Description

This function is intended to ensure proper formatting of the supplied sets to the create_hierarchy() constructor. Support for other input objects can be created by writting a format_sets method for the class.

Usage

format_sets(x)

Value

A presence/absence matrix with sets as columns and elements as rows, formatted as a ngCMatrix

Arguments

x

The sets to be formatted

Examples

Run this code
data('twitter')
format_sets(as.matrix(twitter))

Run the code above in your browser using DataLab