title: Collapsible tree in R
body: <p>I am motivated by this article regarding Collapsible Tree in R</p>
  
  <p><a href="http://bl.ocks.org/mbostock/4339083" rel="noreferrer">http://bl.ocks.org/mbostock/4339083</a></p>
  
  <p>I am trying to reproduce the same example using a toy dataset like this</p>
  
  <pre><code>ID      Car Bus Train   Feedback_Car    Feedback_Bus    Feedback_Train
  23433   Yes Yes Yes     Toyota          GreyHound       Amtrak
  </code></pre>
  
  <p>Which can be represented as a collapsible tree as follows</p>
  
  <p><a href="https://i.stack.imgur.com/UmlIc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UmlIc.png" alt="enter image description here"></a></p>
  
  <p>I am wondering if anybody can help me reproduce that concept (collapsible trees) using this toy dataset above, this example will then give me an idea how different components work, for example formatting the JSON data in R etc...and serve as a starting point. Thanks in advance.</p>