Re: [Rd] data frame subscription operator

2006-11-08 Thread Vladimir Dergachev
On Wednesday 08 November 2006 11:41 am, Gabor Grothendieck wrote: > .subset and .subset2 are equivalent to [ and [[ except that > dispatch does not take place. See ?.subset > Thank you Gabor ! I made an experiment and got rid of class(x) <- attr(x, "row.names") <- NULL while replacing all

Re: [Rd] data frame subscription operator

2006-11-08 Thread Gabor Grothendieck
.subset and .subset2 are equivalent to [ and [[ except that dispatch does not take place. See ?.subset On 11/8/06, Vladimir Dergachev <[EMAIL PROTECTED]> wrote: > On Wednesday 08 November 2006 3:21 am, Prof Brian Ripley wrote: > > > > > So far I was not able to figure out why this is necessary -

Re: [Rd] data frame subscription operator

2006-11-08 Thread Vladimir Dergachev
On Wednesday 08 November 2006 3:21 am, Prof Brian Ripley wrote: > > > So far I was not able to figure out why this is necessary - > > could anyone help ? > > You need to remove the class to avoid recursion: a few lines later x[i] > needs to be a call to the primitive and not the data frame method.

Re: [Rd] data frame subscription operator

2006-11-08 Thread Prof Brian Ripley
'[' is the 'subscript' or 'extraction', not 'subscription' operator: this is also called 'indexing', as in 'An Introduction to R'. On Mon, 6 Nov 2006, Vladimir Dergachev wrote: > I was looking at the data frame subscription operator (attached in the end > of this e-mail) and got puzzled by the

[Rd] data frame subscription operator

2006-11-06 Thread Vladimir Dergachev
Hi all, I was looking at the data frame subscription operator (attached in the end of this e-mail) and got puzzled by the following line: class(x) <- attr(x, "row.names") <- NULL This appears to set the class and row.names attributes of the incoming data frame to NULL. So far I was no