Q:

Use of dollar sign in data frames with missing end of the name

Maybe this is not the place to ask this. I recently run into a weird 
error that took hours to debug. Finally I saw that one of the column names
was outputing a wrong value. The issue can be simplified to this simple example.
dframe1 = data.frame(
  hello_a = "a",
  hello_b = "b"
)

dframe1$hello
#> NULL

dframe2 = data.frame(
  hello_a = "a",
  bye_b = "b"
)

dframe2$hello
#> [1] a
#> Levels: a
dframe2$bye
#> [1] b
#> Levels: b
dframe2[,"bye"]
#> Error in `[.data.frame`(dframe2, , "bye"): undefined columns selected
dframe2[,"bye_b"]
#> [1] b
#> Levels: b

Created on 2019-05-29 by the reprex package (v0.2.0).
This is weird to me, is there a way to enforce a "strict" mode for R so this does not happen? I understand data frames are some sort of lists in R but is there some documentation on the use of $?  

A:

I found the docs regarding this issue,

x$name is equivalent to x[["name", exact = FALSE]] 

So if we do
dframe2[["bye",exact = FALSE]]
[1] b
Levels: b

we get the expected behavior. I still don't know if we can change that behavior without using [[ which needs string.
EDIT
As Ben Bolker suggests in the comments, this is more or less what I wanted to do.
options(warnPartialMatchDollar=TRUE)
options(warn=2)

dframe2 = data.frame(
  hello_a = "a",
  bye_b = "b"
)

dframe2$hello
#> Warning in `$.data.frame`(dframe2, hello): Partial match of 'hello' to
#> 'hello_a' in data frame
#> [1] a
#> Levels: a

Created on 2019-05-29 by the reprex package (v0.2.0).

