ll_zero_finder2: Zero finding function

Description Usage Arguments Value Examples

View source: R/ll_zero_finder.R

Description

Finds the zeros of a function af. Alternative to uniroot, designed specifically to work with the genpwr package. Finds multiple zeros if a function has more than one in the given range.

Usage

1
ll_zero_finder2(af, ii = 6, lower = 0, upper = 1, qdelta = 27)

Arguments

af

The function for which to find the zero(s)

ii

Number of iterations. The more iterations, the more accuracy. It is recommended that ii be at least 4.

lower

Lower limit of region in which to find the zero

upper

Upper limit of region in which to find the zero

qdelta

Factor for finding intervals over which the function is close to zero

Value

Points over the given interval at which the given function is approximately equal to zero

Examples

1
2
ll_zero_finder2(function(x) (x-0.5)^2 - 0.1)
ll_zero_finder2(function(x) 8*x^3 - 11.2*x^2 + 4.56*x - 0.476)

genpwr documentation built on March 31, 2021, 1:06 a.m.