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

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Fri 22 Dec 2006 - 06:07:27 GMT


The old apropos started with:

    if (!is.character(what))

        what <- as.character(substitute(what))

The new one has:

   if (character.only)

        stopifnot(is.character(what))
    else what <- as.character(substitute(what))

i.e., the check for is.character(what) is missing. This has the effect that 'what' can no longer be a character string generated by a function call unless 'character.only = TRUE'. I don't think this was intended; the change makes previously valid use invalid and I can't think of a situation where it is useful.

-Deepayan

> apropos(paste("^", "lm", sep = ""))

[1] "paste"
There were 12 warnings (use warnings() to see them)
> warnings()

Warning messages:
1: the condition has length > 1 and only the first element will be used in: if (is.na(pattern)) { ...
2: the condition has length > 1 and only the first element will be used in: if (is.na(pattern)) { ...
3: the condition has length > 1 and only the first element will be used in: if (is.na(pattern)) { ...
...

> sessionInfo()

R version 2.5.0 Under development (unstable) (2006-12-21 r40280) powerpc-unknown-linux-gnu

locale:
LC_CTYPE=bn_IN.UTF-8;[etc etc]

attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base"



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Dec 22 17:09:46 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 22 Dec 2006 - 17:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.