Re: [R-pkg-devel] S3 length method behavior

2016-02-02 Thread Martin Maechler
> Barry Rowlingson > on Tue, 2 Feb 2016 17:23:46 + writes: > On Tue, Feb 2, 2016 at 3:28 PM, Hadley Wickham wrote: >> I've found that it's a very bad idea to provide length or names >> methods for just this reason.

Re: [R-pkg-devel] S3 length method behavior

2016-02-02 Thread Hadley Wickham
I've found that it's a very bad idea to provide length or names methods for just this reason. Hadley On Sat, Jan 30, 2016 at 1:25 PM, Nathan Wendt wrote: > Hello, > > I have run into an issue while developing an R package. Specifically, my > issue relates to what happens

Re: [R-pkg-devel] S3 length method behavior

2016-02-01 Thread Jim Lemon
> > > You could define methods for indexing ("[" and "[[") for objects from your > class. > Since you have not defined special subsetting methods for your class, R > uses a default one, but honours your length(), hence the mess. > > Regards, > Georg