Re: [R] setMethod for "["

2008-03-21 Thread Musa Parmaksiz
r point of view (who will "see" myClass as a matrix), distinguishing myClass[1] and myClass[1,] is suitable. Thanks again for the help... On Fri, Mar 21, 2008 at 6:05 PM, Martin Morgan <[EMAIL PROTECTED]> wrote: > Hi Musa -- > > Musa Parmaksiz wrote: > > Hi Martin,

Re: [R] setMethod for "["

2008-03-20 Thread Musa Parmaksiz
., drop=drop) else callNextMethod([EMAIL PROTECTED], i=i, j=j, ..., drop=drop) }) one cannot distinguish between test[1] and test[1,] ! I suspect we could use nargs()... On Fri, Mar 21, 2008 at 12:43 AM, Martin Morgan <[EMAIL PROTECTED]> wrote: > Hi Musa -- &g

[R] setMethod for "["

2008-03-20 Thread Musa Parmaksiz
Hi R-Help, Please consider the following simple case: I have a class like setClass("myClass", representation(x="matrix", y="character")) and I would like to use the method *"["* for a *myClass* objects (but changing the default *drop* argument from TRUE to FALSE): setMethod("[","