I\'ve encountered a strange behavior when dropping columns from data.frame. Initially I have:
> a <- data.frame(\"a\" = c(1,2,3), \"abc\" = c(3,2,1));
From the the help. ?$
name: A literal character string or a name (possibly backtick quoted). For extraction, this is normally (see under ‘Environments’) partially matched to the names of the object.
So that's the normal behaviour because the name is partially matched. See ?pmatch for more info about partial matching.
Cheers