This function takes a vector and checks if any information is lost by rounding to a certain number of digits.
is.round(x, digits = 0)
Returns TRUE
if rounding to digits
digits after the decimal can be done without losing information.
is.round(1:5)
#> [1] TRUE
x <- c(1, 1.2, 1.23)
is.round(x)
#> [1] FALSE
is.round(x,digits=2)
#> [1] TRUE