[Rd] Help page on '$': 'warnPartialMatchAttr' should be 'warnPartialMatchDollar'

Martin Maechler maechler at stat.math.ethz.ch
Mon Nov 19 18:52:13 CET 2012


Thank you, Suharto,

you are right, there (on  ?Extract  ) has been a typo.

I've fixed it and also added an example at the very end of that
help page.

Martin Maechler, ETH Zurich


>>>>> Suharto Anggono <suharto_anggono at yahoo.com>
>>>>>     on Thu, 15 Nov 2012 23:48:12 -0800 writes:

    > http://stackoverflow.com/questions/6065724/assigning-value-to-a-variable-that-has-a-dot-in-the-name
    > made me realize this.  The context is 'a' is assigned to
    > ret$log.id, but then ret$log returns "a" and ret$l also
    > returns "a".  There is a comment from Charles on the
    > question: "Also see options(warnPartialMatchDollar=T) if
    > you want to track these."


    > But, in bottom part, there is Chase's answer, quoting help
    > page for $.

    > ... under Character indices: Thus the default behaviour is
    > to use partial matching only when extracting from
    > recursive objects (except environments) by $. Even in that
    > case, warnings can be switched on by
    > options(warnPartialMatchAttr = TRUE).


    > This is what I get from R documentation of 'options'.

    >      ‘warnPartialMatchAttr’: logical.  If true, warns if
    > partial matching is used in extracting attributes via
    > ‘attr’.

    >      ‘warnPartialMatchDollar’: logical.  If true, warns if
    > partial matching is used for extraction by ‘$’.


    > So, in the part of help page on '$' quoted in part of
    > Chase's answer above, options(warnPartialMatchAttr = TRUE)
    > should be options(warnPartialMatchDollar = TRUE)


    > This is in R 2.15.2.

    > ______________________________________________
    > R-devel at r-project.org mailing list
    > https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list