[r] How to remove last n characters from every element in the R vector