Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.round

Checks if information is lost by rounding


Description

This function takes a vector and checks if any information is lost by rounding to a certain number of digits.

Usage

is.round(x, digits = 0)

Arguments

x

A vector.

digits

How many digits to round to.

Details

Returns TRUE if rounding to digits digits after the decimal can be done without losing information.

Examples

is.round(1:5)

x <- c(1, 1.2, 1.23)
is.round(x)
is.round(x,digits=2)

vtable

Variable Table for Variable Documentation

v1.3.1
MIT + file LICENSE
Authors
Nick Huntington-Klein [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.