From luke at stat.uiowa.edu  Fri Dec 22 14:08:44 2006
From: luke at stat.uiowa.edu (Luke Tierney)
Date: Fri, 22 Dec 2006 07:08:44 -0600 (CST)
Subject: [Rd] apropos changes in r-devel: intended feature or bug?
In-Reply-To: <17803.54275.647233.118289@mithrandir.hornik.net>
References: <eb555e660612212207q761861a1r7e95b7bdc3a8b6eb@mail.gmail.com>
	<17803.37850.646209.904350@stat.math.ethz.ch>
	<17803.54275.647233.118289@mithrandir.hornik.net>
Message-ID: <Pine.LNX.4.64.0612220707180.23527@itasca2.wildberry.org>

On Fri, 22 Dec 2006, Kurt Hornik wrote:

>>>>>> Martin Maechler writes:
>
>>>>>> "DeepS" == Deepayan Sarkar <deepayan.sarkar at gmail.com>
>>>>>>     on Thu, 21 Dec 2006 22:07:27 -0800 writes:
>
> DeepS> The old apropos started with: if
> DeepS> (!is.character(what)) what <-
> DeepS> as.character(substitute(what))
>
> DeepS> The new one has:
>
> DeepS> if (character.only) stopifnot(is.character(what))
> DeepS> else what <- as.character(substitute(what))
>
> DeepS> i.e., the check for is.character(what) is
> DeepS> missing. This has the effect that 'what' can no
> DeepS> longer be a character string generated by a function
> DeepS> call unless 'character.only = TRUE'. I don't think
> DeepS> this was intended; the change makes previously valid
> DeepS> use invalid and I can't think of a situation where it
> DeepS> is useful.
>
>> [ Did you read the corresponding NEWS entry? ]
>
>> It now parallelizes the use in library() , require() etc,
>> and in particular does what the documentation says it does!
>
>> The old behavior was much less consistent and not according to
>> documentation:
>
>>      apropos(lm)    was equivalent to apropos("lm")
>> but  apropos(fit)   gave an error.
>
> I would actually prefer if we only had standard evaluation for apropos()
> and find().
>
> (I understand we cannot do this for library() and help().)

I agree completely.  If it is OK to make changes that make previous
usage fail then it would be better to go to standard evaluation and
let apropos(lm) fail.

luke

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke at stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu



[Rd] apropos changes in r-devel: intended feature or bug?
Luke Tierney