[Rd] "Name partially matched in data frame"

Duncan Murdoch murdoch.duncan at gmail.com
Wed Apr 30 21:32:16 CEST 2014


On 30/04/2014 3:03 PM, Fisher Dennis wrote:
> R 3.1.0
> OS X
>
> Colleagues,
>
> I recently updated to 3.1.0 and I have encountered
> 	Warning messages: ...  Name partially matched in data frame
> when I do something like:
> 	DATAFRAME$colname
> where colname is actually something longer than that (but unambiguous).
>
> I have much appreciated the partial matching capabilities because it fits with my workflow.  I often receive updated data months after the initial code is written.  In order to keep track of what I did in the past, I provide lengthy (unambiguous) names for columns, then abbreviate the names as I call them.  This behavior has been termed “lazy” in various correspondence on this mailing list but it works for me and probably works for others.
>
> I realize that the new message is only a warning but it is a minor nuisance.  Would it be possible to add an
> 	option(partialMatch=TRUE)	## default is FALSE
> or something similar to suppress that behavior?  That should keep both camps happy.

I'd be much happier with a general mechanism to suppress particular 
warnings.  Then you could choose to suppress this one.

We might be able to do that with options("warning.expression"), but I 
don't see how...

Duncan Murdohc



More information about the R-devel mailing list