From pdalgd at gmail.com  Mon Oct 21 16:10:17 2013
From: pdalgd at gmail.com (peter dalgaard)
Date: Mon, 21 Oct 2013 16:10:17 +0200
Subject: [Rd] Possible tweak to R intro - was RE: [R] Subseting a
	data.frame -
In-Reply-To: <5264E317.2000908@stats.ox.ac.uk>
References: <1381992934.80794.YahooMailNeo@web193203.mail.sg3.yahoo.com>	<CACk-te1_Oxvn6Zad9mV6zKvbTAWE=Ft7WXS3_F5pBPyGhdqCtg@mail.gmail.com>	<A4E5A0B016B8CB41A485FC629B633CED5487F213BA@GOLD.corp.lgc-group.com>	<CACk-te1Y2jifecRE3fam8SMUgDZNcjTKAsHDprQoCrnq+tarhQ@mail.gmail.com>
	<A4E5A0B016B8CB41A485FC629B633CED5487F2148A@GOLD.corp.lgc-group.com>
	<5264E317.2000908@stats.ox.ac.uk>
Message-ID: <C0704652-E45E-45D3-96D7-2CA7D264D65E@gmail.com>


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



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