[Rd] how to interpose my own [ function?

2013-09-29 Thread Andrew Piskorski
I want to create my own [ function (for use on vectors, matrices, arrays, etc.), which calls the stock R [, does some additional work, and then finally returns the modified result. But, how do I properly call the stock R [ function? It takes a varying number of positional arguments, and its

Re: [Rd] how to interpose my own [ function?

2013-09-29 Thread Henrik Bengtsson
Typically you use NextMethod(), but otherwise you can either unclass your object first or use .subset(). Not sure from ?.subset whether that is ok to use or not. /Henrik On Sun, Sep 29, 2013 at 8:26 PM, Andrew Piskorski a...@piskorski.com wrote: I want to create my own [ function (for use on