[R] automatic completion of object names

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Fri Jul 6 16:29:29 CEST 2012

This has always been how the $ operator has worked.  See ?"[[", and use that operator directly if you want exact matching.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

knallgrau at gmx.com wrote:

>Hello there,
>I just upgraded to R 2.15 (from R 2.12) on a Windows XP machine and
>noticed some puzzling behaviour (that in my opinion did not exist in R
>It is possible now to call objects without spelling out the full object
>name. R now seems to use that (unique) object which shares the same
>beginning of the called object, even though the originally called
>object might not even exist. 
>This is quite awkwardly described, but perhaps you know what I'm
>talking about?
>Let's say I'm using the Mroz data supplied with the car package:
>there is no variable called "w" in that dataframe, but calling 
>summary(Mroz$w) #### Mroz$w does not exist
>does not return any error but instead gives the same result as 
>summary(Mroz$wc) ##### exists in Mroz
>I find this behaviour *very* undesirable. Is there any way to switch it
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list