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

Martin Maechler maechler at stat.math.ethz.ch
Fri Dec 22 09:14:18 CET 2006


>>>>> "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.

Martin

    DeepS> -Deepayan



More information about the R-devel mailing list