The following will throw the error “Error in v$a : $ operator is invalid for atomic vectors” (at least in R version 2.14.1):
v <- c(a='a',b='b')
v$a
Apparently, R previously allowed this, which makes me curious as to why.
EDIT: As pointed out below, v$a would have returned NULL in the earlier versions. Changed “fairly recently” to “previously”, since I based this on old Internet forums and have been corrected below.
I believe the reason is that the use of
v$avs.v[['a']]is considered less safe.EDIT: Check out this LINK for more details.