[R] own TAB expansion

Duncan Murdoch murdoch.duncan at gmail.com
Fri Oct 8 13:38:24 CEST 2010


On 08/10/2010 7:22 AM, Sebastian Gibb wrote:
> Hello,
> 
> how can I add <TAB> expansion on R command line for own S4 classes?
> 
> setClass(Class="A", representation=representation(slotA="numeric", 
> slotB="numeric"));
> setMethod("$", "A", function(x, name) {return(slot(x, name));})
> a <- new("A", slotA=1, slotB=2)
> 
> a$  <TAB>
>> a$
> 
> should become:
> a$ <TAB>
>> a$slotA a$slotB

See ?rcompgen.

Duncan Murdoch



More information about the R-help mailing list