I want to remove some letters (after a specific letter) of a word in a sentence (in a dataframe). For instance, I have a text as below, and I want to delete letters appearing after hyphen in a word.
a <- c(1,2)
b <- c("I need-2ed a data-mining technique-s", "edu-cational technology")
ab <- data.frame(a,b)
What I want to get is
a b
1 1 I need a data technique
2 2 edu technology
Any one can help me?