r4fun / hierplane

🌳 Hierplane for R
https://r4fun.github.io/hierplane/
Other
9 stars 0 forks source link

Resolve tibble input #23

Closed mathidachuk closed 4 years ago

mathidachuk commented 4 years ago

hierplane now works with tibbles!

library(hierplane)
a <- dplyr::tribble(
  ~parent_id,  ~child_id,  ~child,     ~node_type, ~link,      ~height,  ~age,
  "Bob",       "Bob",      "Bob",      "gen1",     "ROOT",     "100 cm", "60 yo",
  "Bob",       "Angelica", "Angelica", "gen2",     "daughter", "100 cm", "30 yo",
  "Bob",       "Eliza",    "Eliza",    "gen2",     "daughter", "90 cm",  "25 yo",
  "Bob",       "Peggy",    "Peggy",    "gen2",     "daughter", "50 cm",  "10 yo",
  "Angelica",  "John",     "John",     "gen3",     "son",      "10 cm",  "0.5 yo",
  "Bob",       "Jess",     "Jess",     "ext",      "cousin",   "70 cm",  "150 yo"
)

hierplane(a, title = "Family Tree",
          settings = hierplane_settings(attributes = c("height", "age")))
hierplane(as.data.frame(a), title = "Family Tree",
          settings = hierplane_settings(attributes = c("height", "age")))
tylerlittlefield commented 4 years ago

This looks good, I am tempted to merge before the checks complete based on the new profile pic alone 😅