deleting characters from the right side of a vector

Hi,

I have a dataframe with a column of character strings of various lengths that looks something like

c("10002017R", "202017R", "5002017E")

What function can I use to get rid of the right 5 characters on all values?

Thanks so much!
Erica

Nevermind, I did it with gsub

gsub('.{5}
```, '', my.vector)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.