AdeelK93 / collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js
https://adeelk93.github.io/collapsibleTree/
158 stars 41 forks source link

use Node$attributes instead of deprecated Node$fields [#59] #60

Closed bhogan-mitre closed 3 years ago

bhogan-mitre commented 3 years ago

Reprex from data.tree vignette portfolio example:

fileName <- system.file("extdata", "portfolio.csv", package="data.tree")
pfodf <- read.csv(fileName, stringsAsFactors = FALSE)
pfodf$pathString <- paste("portfolio",
  pfodf$AssetCategory,
  pfodf$AssetClass,
  pfodf$SubAssetClass,
  pfodf$ISIN,
  sep = "/")
pfo <- as.Node(pfodf)

Before:

> collapsibleTree(pfo)
[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."
[1] "Node$fields will be deprecated in the next release. Please use Node$attributes instead."

After:

> collapsibleTree(pfo)
>

Closes #59