

   FFuunnccttiioonn ttoo ccoommppuuttee aarrrraayy ooff bbiinn ccoouunnttss ffoorr aa ddaattaa vveeccttoorr

        bin1(x, ab, nbin=50)

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

          x: (input) data vector

         ab: (input vector of length 2):  half-open interval
             for bins [a,b).  If no value is specified, the
             range of x is stretched by 5% at each end and used
             the interval.

       nbin: (input integer):  number of bins desired. Default
             50.

        opt: (input OPTIONAL logical):  to suppress output mes-
             sages, set `opt=TRUE'

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

        `bin1' returns a list including the vector of integer
        bin counts and the ab vector and the number of points
        outside the ab interval.

   SSeeee AAllssoo::

        `ash1'

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

        x <- rnorm(100)         # data vector
        ab <- c(-5,5)           # bin interval
        bins <- bin1(x,ab,10)     # bin x into 10 bins over ab

