[R] The end of Matlab

Vitalie Spinu vitosmail at rambler.ru
Fri Dec 12 22:08:19 CET 2008

On Fri, 12 Dec 2008 18:27:02 +0100, hadley wickham <h.wickham at gmail.com> wrote:

>> or may be just
>> mtcars[cyl>3&last(20)]
>> or this is already too far?
> This would be a considerable extension because then the selector would
> need to know about all other variables in the dataset, and you'd need
> someway of combining selectors with logical vectors. 

If selector returns a logical vector then I really don't see where is the problem. Probably I am mistaken but implementing mtcars[cyl>3] is not such a big deal. Just an operator `[.` start searching for "cyl" from inside the "x" frame and not from parent.frame as it does now. It is just like putting "with" inside '[', or not?

When started with R I was really disappointed that such a natural and intuitive subsetting  is not allowed, but instead lengthy and ackward mtcars[mtcars$syl>3] is required.

R is an interactive language for 99% of the users and features like that(and selectors indeed) would make a tremendous difference.


More information about the R-help mailing list