Here are three versions of detecting ABC at the beginning of the row names using grep functions from base R. The ^ before the ABC signifies the beginning of the string so that the first row name does not match.
DF <- data.frame(Value = 1:5, row.names = c("WABC", "TREWS", "ABCand", "UIO", "BDDSE"))
grep(pattern = "^ABC", row.names(DF))
#> [1] 3
grepl(pattern = "^ABC", row.names(DF))
#> [1] FALSE FALSE TRUE FALSE FALSE
any(grepl(pattern = "^ABC", row.names(DF)))
#> [1] TRUE
Created on 2020-09-14 by the reprex package (v0.3.0)