zero_range: The machine epsilon is the difference between 1.0 and the...

View source: R/general_tools.R

zero_rangeR Documentation

The machine epsilon is the difference between 1.0 and the next number that can be represented by the machine. By default, this function uses epsilon * 1000 as the tolerance. First it scales the values so that they have a mean of 1, and then it checks if the difference between them is larger than the tolerance. Just added na.rm argument to allow for NA in x. see https://www.rdocumentation.org/packages/scales/versions/0.4.1/topics/zero_range

Description

The machine epsilon is the difference between 1.0 and the next number that can be represented by the machine. By default, this function uses epsilon * 1000 as the tolerance. First it scales the values so that they have a mean of 1, and then it checks if the difference between them is larger than the tolerance. Just added na.rm argument to allow for NA in x. see https://www.rdocumentation.org/packages/scales/versions/0.4.1/topics/zero_range

Usage

zero_range(x, tol = .Machine$double.eps^0.5, na.rm = TRUE)

Arguments

x
tol

simschul/my.utils documentation built on June 29, 2023, 6:50 a.m.