[Rd] Possible tweak to R intro - was RE: [R] Subseting a data.frame -

peter dalgaard pdalgd at gmail.com
Mon Oct 21 16:10:17 CEST 2013


On Oct 21, 2013, at 10:17 , Prof Brian Ripley wrote:

> Some of us think convenience functions such as subset() and transform() were mistakes, not least as we see the problems they cause when people try to use them in functions and packages. Sooner or later you will need to learn to use indexing, and knowing about two systems with different scoping rules is too confusing for quite a few R users.

The author of the two functions begs to differ, except that in hindsight he might have selected to require a formula-style ~ prefix on arguments that have nonstandard evaluation. The potential confusion is of the same sort as when lm() or anything else with a formula interface is used in a function.

I agree, however, that subset() is pretty useless for generic indexing, and that for the target audience of R-Intro, you might as well introduce proper indexing right away. And, of course, the document has named authors, who are entitled to have their opinions reflected in its contents.

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-devel mailing list