Learn R Programming

dynwrap (version 1.2.4)

classify_milestone_network: Classify a milestone network

Description

Classify a milestone network

Usage

classify_milestone_network(milestone_network)

Value

A list containing

  • network_type: The network type (also known as the trajectory_type). See dynwrap::trajectory_types for an overview.

  • directed: Whether the trajectory is directed

  • properties: Different properties of the trajectory, including:

    • is_directed: Whether the trajectory is directed

    • max_degree: The maximal degree

    • num_branch_nodes: The number of branching nodes

    • num_outer_nodes: Number of leaf (outer) nodes

    • is_self_loop: Whether it contains self-loops

    • has_cycles: Whether it has cycles

    • num_components: The number of independent components

Arguments

milestone_network

A milestone network

See Also

dynwrap::trajectory_types

Examples

Run this code
milestone_network <- tibble::tibble(
  from = c("A", "B", "C"),
  to = c("B", "C", "A"),
  length = 1,
  directed = TRUE
)
classification <- classify_milestone_network(milestone_network)
classification$network_type
classification$directed

milestone_network <- tibble::tibble(
  from = c("A", "B", "B", "C", "C"),
  to = c("B", "C", "D", "E", "F"),
  length = 2,
  directed = FALSE
)
classification <- classify_milestone_network(milestone_network)
classification$network_type
classification$directed
classification$props

Run the code above in your browser using DataLab