I have a column in a data frame in R that looks like this:
10.01 10.04 10.08 9.99 9.95 9.98 9.1
I need all of the numbers to have the same number of digits by adding zeros to the beginning or the end but only if there are less than 5 characters (two numbers in each side of the decimal point):
10.01 10.04 10.08 09.99 09.95 09.98 09.10
how can I do it in R? thank you