is.round {vtable}R Documentation

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)

[Package vtable version 1.4.6 Index]