

   FFiinndd tthhee xx wwiitthh tthhee cclloosseesstt yy

        NLSstClosestX(xy, yval)

   AArrgguummeennttss::

         xy: a `sortedXyData' object

       yval: the numeric value on the `y' scale to get close to

   DDeessccrriippttiioonn::

        This function is used to determine the `x' value in a
        `sortedXyData' object that corresponds to the `y' value
        that is closest to `yval'.  The function is mostly used
        within the `initial' functions for a self-starting non-
        linear regression models, which are in the `selfStart'
        class.

   VVaalluuee::

        A single numeric value which is one of the values of
        `x' in the `xy' object.

   AAuutthhoorr((ss))::

        Jose Pinheiro and Douglas Bates

   EExxaammpplleess::

        library( lme )
        data( DNase )
        DNase.2 <- DNase[ DNase$Run == "2", ]
        DN.srt <- sortedXyData( expression(log(conc)), expression(density), DNase.2 )
        NLSstClosestX( DN.srt, 1.0 )

