[Rd] PR#10583

michael.hoehle at gmail.com michael.hoehle at gmail.com
Fri Jan 18 11:30:27 CET 2008


Thank you for your quick reply and for only indirectly scolding me for
abusing the RBugs list. :-) However, I do think there is something
funny in the 2.7.0 docu (or in the code). Things behave as expected and
explained by you for version 2.6.0/2.6.1, but in the development
version 2.7.0 (which I was using) the output is different (see below).

The CHANGES file does mention some changes about the [[ subsetting
operator, partial matching and exact=TRUE, so I still think the
documentation could be
clearer at this point by mentioning abbreviations.

###################Version 2.6.0
> sessionInfo()
R version 2.6.0 Patched (2007-11-12 r43434)
i386-apple-darwin8.10.1

locale:
C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
> control <- list(nameSpace=FALSE)
> control$name
[1] FALSE
> control[["name"]]
[1] FALSE
Warning message:
In control[["name"]] : partial match of 'name' to 'nameSpace'

###################Version 2.7.0 (development)
> sessionInfo()
R version 2.7.0 Under development (unstable) (2007-12-22 r43762)
i386-apple-darwin8.10.1

locale:
C

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

> control <- list(nameSpace=FALSE)
> control$name
[1] FALSE
> control[["name"]]
NULL
^^^^^


Anyhow, with your help I found out that what I really wanted was

control <- list(nameSpace=FALSE)
if (is.null(control[["name",exact=TRUE]])) { control[["name"]] <- TRUE }

Thank your for your help and best regards,

Michael



More information about the R-devel mailing list