The data.tree package is a popular, general purpose hierarchical data structure for R. Therefore, hp_datatree tries to make it so hierplane is compatible with data.tree objects.

hp_datatree(
  .data,
  title = "Hierplane",
  attributes = NULL,
  link = "to",
  node_type = "from",
  styles = NULL
)

Arguments

.data

A data.tree object of class "Node".

title

A title, defaults to "Hierplane", this serves as the header/title of the hierplane.

attributes

Attributes to assign to the nodes, these are the annotation in the nodes.

link

Link connecting each node, theres are the tabs or connections you see between each node.

node_type

A column name that determines the node colors.

styles

Assign styles to hierplane generated from hierplane_styles().

Examples

if (FALSE) { library(hierplane) library(data.tree) library(yaml) yaml <- " name: r4fun tyler: name: Tyler job: Data Scientist species: Human toulouse: name: Toulouse job: Systems Engineer species: Cat jojo: name: Jojo job: Python Programmer species: Dog ollie: name: Ollie job: Database Administrator species: Dog lucas: name: Lucas job: R Programmer species: Rabbit "aml <- " name: r4fun tyler: name: Tyler job: Data Scientist species: Human toulouse: name: Toulouse job: Systems Engineer species: Cat jojo: name: Jojo job: Python Programmer species: Dog ollie: name: Ollie job: Database Administrator species: Dog lucas: name: Lucas job: R Programmer species: Rabbit " yaml %>% yaml.load() %>% as.Node() %>% hp_datatree( node_type = "species", link = "species", attributes = "job" ) %>% hierplane() }