title: How to retrieve the node values from a constparty object?
body: <p>I was trying to find an optimal dichotomized threshold for a continuous variable fitted to a survival model and I was using partykit::ctree() for this purpose:</p>
  
  <pre><code>&gt; library(survival)
  &gt; library(partykit)
  Loading required package: grid
  &gt; data("GBSG2", package = "TH.data")
  
  
  &gt; stree &lt;- ctree(Surv(time, cens) ~ tsize, data = GBSG2)
  &gt; stree$node
  [1] root
  |   [2] V2 &lt;= 19 *
  |   [3] V2 &gt; 19
  |   |   [4] V2 &lt;= 61 *
  |   |   [5] V2 &gt; 61 *
  </code></pre>
  
  <p>My question is how to retrieve the fitted thresholds (e.g. 19 and 61 in the above example).</p>
  
  <pre><code>&gt; class(stree)
  [1] "constparty" "party" 
  </code></pre>