powered by
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)
A vector.
How many digits to round to.
Returns TRUE if rounding to digits digits after the decimal can be done without losing information.
TRUE
digits
is.round(1:5) x <- c(1, 1.2, 1.23) is.round(x) is.round(x,digits=2)
Run the code above in your browser using DataLab