From suharto_anggono at yahoo.com  Fri Nov 16 08:48:12 2012
From: suharto_anggono at yahoo.com (Suharto Anggono Suharto Anggono)
Date: Thu, 15 Nov 2012 23:48:12 -0800 (PST)
Subject: [Rd] Help page on '$': 'warnPartialMatchAttr' should be
	'warnPartialMatchDollar'
Message-ID: <1353052092.85219.YahooMailClassic@web125103.mail.ne1.yahoo.com>

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.



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