I have strings like these:
text <- c("11. Availability...17", "1. Turnover...7")
I want:
c("11. Availability", "1. Turnover")
My idea is to remove everything behind/including the "…" .
Unfotunately I’m not able to fix it with gsub() or similar.
>Solution :
You can use,
gsub('\\.\\.\\..*', '', text)
#[1] "11. Availability" "1. Turnover"