title: Private Members in R Reference Class
body: <p>Is it possible to have private member fields inside of an R reference class.  Playing with some of the online examples I have:</p>
  
  <pre><code>&gt; Account &lt;- setRefClass(    "ref_Account"
  &gt;      , fields = list(
  &gt;       number = "character"
  &gt;       , balance ="numeric")
  &gt;      , methods = list( 
  &gt;     deposit &lt;- function(amount) {
  &gt;       if(amount &lt; 0)   {
  &gt;         stop("deposits must be positive")
  &gt;       }
  &gt;       balance &lt;&lt;- balance + amount
  &gt;     }
  &gt;     , withdraw &lt;- function(amount) {
  &gt;       if(amount &lt; 0)   {
  &gt;         stop("withdrawls must be positive")
  &gt;       }
  &gt;       balance &lt;&lt;- balance - amount
  &gt;     }       
  &gt;   ) )
  &gt; 
  &gt; 
  &gt; tb &lt;- Account$new(balance=50.75, number="baml-029873") tb$balance
  &gt; tb$balance &lt;- 12 
  &gt; tb$balance
  </code></pre>
  
  <p>I hate the fact I can update the balance directly.  Perhaps that the old pure OO in me, I really would like to be able make the balance private, at least non-settable from outside the class.</p>
  
  <p>Thoughts</p>