title: Can rpart work with both numeric and categorical data?
body: <p>I'm trying to train a model in R using both categorical and numeric data to predict whether a customer purchased something, and when I plot the tree to look at the splits it completely ignored gender.</p>
  
  <p>As seen below, I encoded the gender variables to be just 1 and 2. 
  There's roughly an even split between both males and females. 
  I didn't scale any features.</p>
  
  <pre><code>head(df1)
    Gender Age EstimatedSalary Purchased
  1      2  19              19         0
  2      2  35              20         0
  3      1  26              43         0
  4      1  27              57         0
  5      2  19              76         0
  6      2  27              58         0
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UeRFf.png" rel="nofollow noreferrer">I can provide this link showing the decision tree.</a></p>
  
  <p>Is gender simply not significant for this prediction, or am I missing something else?</p>