has_converged: Is the relative error between two numbers is less than the...

Description Usage Arguments

Description

Given two consecutive numbers in a sequence, return TRUE if the relative change is positive but less than the given tolerance.

Usage

1
has_converged(current, previous, tol = 0.01)

Arguments

current

A scalar; the most recent value of the sequence.

previous

A scalar; the second most recent value of the sequence, or a reference value.

tol

The tolerance, a positive scalar near zero.


BenjaK/scanstatistics documentation built on May 5, 2019, 2:41 p.m.