almostZero: Test whether vector elements are effectively zero

Description Usage Arguments Details Value

View source: R/waveStatsZC.R

Description

Test whether elements in vector x are effectively zero, within the square root of machine tolerance for a floating point number.

Usage

1
almostZero(x, y = 0, tolerance = sqrt(.Machine$double.eps))

Arguments

x

Numeric vector of values to compared against 0

y

Value to be compared against. Default is 0.

tolerance

The maximum difference between x and y necessary to call a value non-zero

Details

Returns TRUE for all vector elements that are within rounding error of zero.

Value

TRUE or FALSE for each element of the vector x.


millerlp/oceanwaves documentation built on Sept. 16, 2017, 1:24 a.m.