Learn R Programming

stCEG (version 0.1.0)

summary.event_tree: Summary of an Event Tree

Description

This function provides a summary of an object of class event_tree. It outputs key information about the nodes and edges of the event tree, including the number of nodes and edges, unique levels and labels, and the labels of the edges (with newlines replaced by spaces).

Usage

# S3 method for event_tree
summary(object, ...)

Value

Prints a summary of the event tree to the console, including:

  • The number of nodes and the unique node levels

  • The number of edges and the unique labels in the edges

  • The labels of the edges, with newlines replaced by spaces

Arguments

object

An object of class event_tree. This object should have a list structure with eventtree containing a nested list where x is a dataframe with nodes and edges attributes.

...

Additional arguments passed to or from other methods (ignored).

Examples

Run this code
data <- homicides
event_tree <- create_event_tree(data, columns = c(1,2,4,5), "both")
homicides_ET_summary <- summary(event_tree)

Run the code above in your browser using DataLab