title: ` in R, "error : attempt to apply non-function"
body: <p>Below I have shared a code where I am facing an error after trying to Add a child node in a tree I created using the <code>data.tree</code> package of R software. The error says &quot;attempt to apply non-function&quot;, I don't know if something is wrong with the type of data I provided or it has to something with the syntax.</p>
  <pre><code>&gt; g &lt;- Node$new(&quot;T&quot;)
  &gt; s &lt;- g$AddChild(&quot;S&quot;)
  &gt; n &lt;- g$AddChild(&quot;N&quot;)
  &gt; t &lt;- n$AddChild(&quot;T&quot;)
  &gt; e &lt;- n$AddChild(&quot;E&quot;)
  &gt; u &lt;- e$AddChild(&quot;U&quot;)
  &gt; d &lt;- e$AddChild(&quot;D&quot;)
  &gt; print(g)
        levelName
  1 T            
  2  ¦--S        
  3  °--N        
  4      ¦--T    
  5      °--E    
  6          ¦--U
  7          °--D
  &gt; g$s$AddChild(&quot;F&quot;)
  Error: attempt to apply non-function
  </code></pre>