I just loaded the newest version of R studio with R for mac:
version
_
platform aarch64-apple-darwin20
arch aarch64
os darwin20
system aarch64, darwin20
status
major 4
minor 5.2
year 2025
month 10
day 31
svn rev 88974
language R
version.string R version 4.5.2 (2025-10-31)
nickname [Not] Part in a Rumble
I noticed that it now seems to accept ambiguous references to columns. This is bad! Here is an example.
df <- data.frame(people = c('Susan', 'Mike', 'Gary', 'Wayne'), Age2 = c(2,24,35,1))
df$Age2 df$Age # this should be NULL but gives df$Age2
"Age2" %in% colnames(df) # it correctly tells us that 'Age2' is among the column names "Age" %in% colnames(df) # it correctly tells us that 'Age' is not among the column names.
You might want to check the version you are running with the code above.
I've not encountered a problem like this before. I will contact R Core Team.