

   LLooggiiccaall CCooddiinngg

        logique(a)

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

          a: real-valued vector, with no missing values.

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

        Simple logical coding of a vector: each value in the
        vector is replaced by a 1 (if it is above or equal to
        the median), by a 0 (if it is below the median).

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

        matrix of `length(a)' rows, and two columns.  The first
        column contains the logically coded values of `a', and
        the second column contains their complements.  Hence
        each row of this returned matrix necessarily sums to 1.

   BBAACCKKGGRROOUUNNDD::

        This form of coding is suitable for a subsequent corre-
        spondence analysis.  When all variable have been logi-
        cally (or fuzzily) coded, the row masses (proportional
        to the row sums) are identical.  Logical coding results
        in the input being in complete disjunctive form.

   RReeffeerreenncceess::

        J.-P. Benzecri Correspondence Analysis Handbook Marcel
        Dekker, Basel, 1992.

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

        `flou', `ca', `supplr', `supplc'.

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

        # Logical coding of input variables, `a', `b', `c':
        a.log <- logique(a)
        b.log <- logique(b)
        c.log <- logique(c)
        newdata <- cbind(a.log, b.log, c.log)
        ca.newdata <- ca(newdata)

