title: R: Enable autocompletion in custom class
body: <p>I have created a new class, and I would like to enable R's autocompletion.</p>
  
  <p>An example could be:</p>
  
  <pre><code># Define class
  setClass("customList",
       representation("list")
  )
  
  # Make example
  tmp &lt;- new("customList",
             list(
                 test='a',
                 b=1:3
             )        
  )
  </code></pre>
  
  <p>Which result in:</p>
  
  <pre><code>tmp
  # An object of class "customList"
  # [[1]]
  # [1] 'a'
  #
  # [[2]]
  # [1] 1 2 3
  </code></pre>
  
  <p>This custom list does have the names and named arguments can be used</p>
  
  <pre><code>names(tmp)
  [1] "a" "b"
  tmp$test
  [1] 'a'
  </code></pre>
  
  <p>Now I would like to somehow enable the autocompletion, so I can simply type </p>
  
  <pre><code>tmp$t &lt;TAB&gt; 
  </code></pre>
  
  <p>and get</p>
  
  <pre><code>tmp$test
  </code></pre>
  
  <p>How does one do that?</p>
  
  <p>In advance - thanks!</p>