all_roots: Finds all roots of a function within an interval

Description Usage Arguments

Description

Searches the interval from lower to upper for all roots of a function f with respect to its first argument. Based on rootSolve::uniroot.all.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
all_roots(
  f,
  interval,
  lower = min(interval),
  upper = max(interval),
  tol = .Machine$double.eps^0.2,
  maxiter = 1000,
  trace = 0,
  n = 1000,
  ...
)

Arguments

f

The function for which the root is sought..

interval

A vector containing the end-points of the interval to be searched for the root.

lower

Lower end point of interval.

upper

Upper end point of interval.

tol

Desired accuracy of root

maxiter

Maximum number of iterations

trace

Integer number passed to function uniroot. If positive, tracing information is produced. Higher values giving more details.

n

Number of subintervals in which the root is sought.

...

Additional named or unnamed arguments to be passed to f.


mrc-ide/epihawkes documentation built on Feb. 13, 2021, 10:20 a.m.