title: RStudio + Knitr + mind mapping
body: <p>I am trying to integrate mind mapping using tikz library into rstudio code.
  But am getting an error:</p>
  <p>improper  \prevdepth</p>
  <p>missing \endgroup inserted.</p>
  <p>Here is the piece of code.</p>
  <pre><code>  % mind mapping packages.
  
     \usepackage{tikz}
  
     \usetikzlibrary{mindmap}
  
     \usetikzlibrary{shadows}
  
  \begin{tikzpicture}[grow cyclic, text width = 3cm, align=flush center, ]
  
  \node{Data }
  
        child{node{Renaming Data Variable}}
  
        child{node{Converting data types}}
  
        child{node{Working with date format}}
  
        child{node{Adding New Records}}
  
        child{node{Filtering Data}}
  
        child{node{Dropping Data}}
  
        child{node{Merging and sorting data}}
  
        child{node{Reshaping Data}}
  
        child{node{Detecting Messy Data}}
  
        child{node{{Imputing Missing Data}}
  ;
  \end{tikzpicture}
  </code></pre>