How do I delete a number (one or two digits in length) and the dot directly preceding it each time it occurs at the end of a string within a specific variable in R
R
Try this
gsub("\\.[[:digit:]]*$", "", z)