integers <- c(1234L, 9861230L)
numbers <- c(1234, 9861230)
frmt(integers) # no decimal point
frmt(numbers) # decimal point and zeros to the right
numbers <- c(0.1234, 0.1, 1234.4321, 0.365, 0.375)
frmt(numbers)
Run the code above in your browser using DataLab