

   OOnnee DDiimmeennssiioonnaall RRoooott FFiinnddiinngg

        uniroot(f, interval, lower = min(interval), upper = max(interval),
                tol = .Machine$double.eps^0.25, maxiter = 1000, ...)

   AArrgguummeennttss::

          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: the lower end point of the interval to be
             searched.

      upper: the upper end point of the interval to be
             searched.

        tol: the desired accuracy (convergence tolerance).

    maxiter: the maximum number of iterations.

        ...: additional arguments to `f'.

   DDeessccrriippttiioonn::

        The function `uniroot' searches the interval from
        `lower' to `upper' for a zero of the function `f' with
        respect to its first argument.

   DDeettaaiillss::

        Either `interval' or both `lower' and `upper' must be
        specified.  The function uses Fortran subroutine
        `"zeroin"' (from Netlib) based on algorithms given in
        the reference below.

        If the algorithm does not converge in `maxiter' steps,
        a warning is printed and the current approximation is
        returned.

   VVaalluuee::

        A list with four components: `root' and `f.root' give
        the location of the root and the value of the function
        evaluated at that point. `iter' and `estim.prec' give
        the number of iterations used and an approximate esti-
        mated precision for `root'.

   RReeffeerreenncceess::

        Brent, R. (1973).  Algorithms for Minimization without
        Derivatives.  Englewood Cliffs, NJ: Prentice-Hall.

   SSeeee AAllssoo::

        `polyroot' for all complex roots of a polynomial;
        `optimize', `nlm'.

   EExxaammpplleess::

        f <- function (x,a) x - a
        str(xmin <- uniroot(f, c(0, 1), tol = 0.0001, a = 1/3))
        str(uniroot(function(x) x*(x^2-1) + .5, low=-2, up=2, tol = 0.0001),dig=10)
        str(uniroot(function(x) x*(x^2-1) + .5, low=-2, up=2, tol = 1e-10 ),dig=10)

