Warning when partially matching outlet names

I just discovered an error caused by partial matching of row names in a data frame. Is there a way to disable partial negotiation with an operator [or create an alert when using global matching? I know that this is possible with exact = TRUEfor operator [[or with index options(warnPartialMatchDollar = TRUE)for $.

df <- data.frame(ab=1:4,cd=1:4)
rownames(df) <- paste0(letters[1:4],"a")
options(warnPartialMatchDollar = TRUE) 
df$a      # warning!
df["a",]  # no warnig
+3
source share

Source: https://habr.com/ru/post/1619574/


All Articles