Think of a partial match. On the help page for $ :
In the "Arguments" section:
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.
and then under the character indices:
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).
Also under symbolic 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).
See names and pmatch more details, but this cleared it for me.
Chase source share