title: Save rpart decision tree rules to a dataframe
body: <p>I am using rattle::asRules() to display rpart decision rules to the screen,
  my goal is to save the rules to a tidy data frame.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>library(rpart)
  library(rattle)
  
  fit &lt;- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
  rattle::asRules(fit, TRUE)
  </code></pre>
  
  <p>Desired Output:
  <a href="https://i.stack.imgur.com/uBrbs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uBrbs.png" alt="enter image description here"></a></p>