R compare strings code example
Example 1: compare two string in R
library(stringi)
stri_reverse("madam")
## [1] "madam"
stri_reverse("sir")
## [1] "ris"
Example 2: compare two string in R
ifelse(identical(c("a", "s"), c("a", "s")), "Indeed", "Not At All")
# Your question could be solved as:
ifelse(identical(string, reversed_split), "Indeed", "Not At All")