

   SSyymmbboolliicc NNuummbbeerr CCooddiinngg

        symnum(x, cutpoints=c(0.3, 0.6, 0.8, 0.9, 0.95),
                  symbols=c(" ", ".", ",", "+", "*", "B"), na="?", eps=1e-5,
               corr = TRUE, show.max = if(corr)"1", show.min = NULL,
               lower.triangular = corr & is.matrix(x))

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

          x: numeric vector or array.

   cutpoints: numeric vector whose values `cutpoints[j]' ==
             c[j]  (after augmentation, see `corr' below) are
             used for intervals.

    symbols: character vector, one shorter than (the augmented,
             see `corr' below) `cutpoints'.  `symbols[j]'==
             s[j] are used as ``code'' for the (half open)
             interval (c[j], c[j+1]].

         na: character. How `NAs' are coded.

        eps: absolute precision to be used at left and right
             boundary.

       corr: logical.  If `TRUE', `x' contains correlations.
             The cutpoints are augmented by `0' and `1' and
             `abs(x)' is coded.

   show.max: If `TRUE', or of mode `character', the maximal
             cutpoint is coded especially.

   show.min: If `TRUE', or of mode `character', the minmal cut-
             point is coded especially.

   lower.triangular: logical. If `TRUE' and `x' is a matrix,
             only the lower triangular part of the matrix is
             coded as non-blank.

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

        An atomic character object of class `noquote' and the
        same dimensions as `x'.  It has an `attribute', `"leg-
        end"' containing a legend of the returned character
        codes, in the form

              c[1] `s[1]' c[2] `s[2]' ... `s[n]' c_[n+1]

        where c[j]` = cutpoints[j]' and s[j]` = symbols[j]'.

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

        Martin Maechler maechler@stat.math.ethz.ch

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

        `as.character'

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

        symnum(1:7, cut= 2*(0:4), sym = c(".", "-", "+", "$"), corr=F)
        symnum(0:8, cut= 2*(0:4), sym = c(".", "-", "+", "$"), corr=F, show.max=T)

        ##-- Symbolic correlation matrices:
        symnum(cor(rbind(1, rnorm(25), rnorm(25)^2)))
        symnum(cor(matrix(rexp(30, 1), 5, 18))) # <<-- PATTERN ! --
        symnum(cor(matrix(rnorm(90) ,  5, 18))) # < White Noise SMALL n
        symnum(cor(matrix(rnorm(900), 50, 18))) # < White Noise "BIG" n

        ## NA's:
        Cm <- cor(matrix(rnorm(60),  10, 6)); Cm[c(3,6), 2] <- NA
        symnum(Cm, show.max=NULL)

        ## Significance stars for P-values:
        pval <- rev(sort(c(outer(1:6,10^-(1:3)))))
        symp <- symnum(pval, corr=F,
                  cutpoints = c(0,  .001,.01,.05, .1, 1),
                  symbols   =  c("***","**","*","."," "))
        noquote(cbind(P.val = format(pval), Signif= symp))

