Skip to content
Prev 255751 / 398506 Next

replace last 3 characters of string

Bert Jacobs-2 wrote:
Besides the mentioned standard method: I found the subset of string
operations in Hadley Wickhams stringr package helpful. They have a much more
consistent interface compared to the standard interface.

str_sub: accepts negative positions, which are calculated from the left of
the last character.

Dieter



--
View this message in context: http://r.789695.n4.nabble.com/replace-last-3-characters-of-string-tp3424354p3425855.html
Sent from the R help mailing list archive at Nabble.com.