clo               package:compositions               R Documentation

_C_l_o_s_u_r_e _o_f _a _c_o_m_p_o_s_i_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Closes compositions to sum up to one (or an optional total), by
     dividing each part by the sum.

_U_s_a_g_e:

               clo( X, parts=1:NCOL(oneOrDataset(X)),total=1)
               

_A_r_g_u_m_e_n_t_s:

       X: composition or dataset of compositions

   parts: vector containing the indices xor names of the columns to be
          used

   total: the total amount to which the compositions should be closed;
          either  a single number, or a numeric vector of length
          'gsi.getN(X)' specifying a different total for each
          compositional vector in the dataset.

_D_e_t_a_i_l_s:

     The closure operation is given by

                    clo(x) := ( _x_i_ / sum(x_j))

     'clo' makes a composition without assigning one of the
     compositional classes 'acomp' or 'rcomp'.  Note that after
     computing the closed-to-one version, obtaining a  version closed
     to any other value is done by simple multiplication.

_V_a_l_u_e:

     a composition or a datamatrix of compositions without
     compositional class. The individual compositions are forced to sum
     to 1 (or to  the optionally-specified total). The result should
     have the same shape as the input (vector, row, matrix).

_N_o_t_e:

     'clo' can be used to unclass compositions.

_R_e_f_e_r_e_n_c_e_s:

     Aitchison, J. (1986) _The Statistical Analysis of Compositional
     Data_ Monographs on Statistics and Applied Probability. Chapman &
     Hall Ltd., London (UK). 416p.

_S_e_e _A_l_s_o:

     'clr','acomp','rcomp'

_E_x_a_m_p_l_e_s:

     (tmp <- clo(c(1,2,3)))
     clo(tmp,total=100)
     data(Hydrochem)
     cdata <- Hydrochem[,6:19]
     plot( clo(Hydrochem,8:9) ) # Giving points on a line 

