R has been using it for a while, but my regular expression skills are a beginner. I am trying to remove "s" if its last character is in EXCEPT, if it is preceded by "i" or "s", for example. Example...
dfx <- c("class","guests","trips","sassy","basis","fruits")
dfx <- sub("s$","",dfx)
View(dfx)
Any examples or recommendations would be appreciated.
source
share