Skip to content
Prev 343577 / 398506 Next

Unexpected behavior when giving a value to a new variable basedon the value of another variable

On Aug 30, 2014, at 7:38 PM, David Winsemius wrote:

            
I realized later that I had not constructed a test of you behavior and  
that when I did I see the creation of a third column. The answer is to  
read the help page:

?`[<-`

"Character indices can in some circumstances be partially matched (see  
pmatch) to the names or dimnames of the object being subsetted (but  
never for subassignment). "

Note the caveat in parentheses.