rcomparithm           package:compositions           R Documentation

_A_r_i_t_h_m_e_t_i_c _o_p_e_r_a_t_i_o_n_s _f_o_r _c_o_m_p_o_s_i_t_i_o_n _i_n _r_e_a_l _g_e_o_m_e_t_r_y

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

     The real compositions form a manifold of real vector space. The
     induced operations +,-,*,/ give results valued in the real  vector
     space, but possibly outside the simplex.

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

        x+y
        x-y
        -x
        x*r
        r*x
        x/r
     convex.rcomp(x,y,alpha=0.5)

               

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

       x: an rcomp composition or dataset of compositions 

       y: an rcomp composition or dataset of compositions 

       r: a numeric vector of size 1 or nrow(x)

   alpha: a numeric vector of size 1 or nrow(x) with values between 0
          and 1

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

     The functions behave quite like '+.rmult'.
      The convex combination is defined as: 'x*alpha + (1-alpha)*y'

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

     'rmult'-objects containing the given operations on the simplex as
     subset of the R^D. Only the convex combination 'convex.rcomp'
     results in an 'rcomp'-object again, since only this operation is
     closed.

_N_o_t_e:

     For '*' the arguments x and y can be exchanged.

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

     '+.rmult', '+.acomp','cpt', 'rcomp', 'rmult'

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

     rcomp(1:5)* -1 + rcomp(1:5)
     data(SimulatedAmounts)
     cdata <- rcomp(sa.lognormals)
     plot( tmp <- (cdata-mean(cdata))/msd(cdata) )
     class(tmp)
     mean(tmp)
     msd(tmp)
     var(tmp)
     plot(convex.rcomp(rcomp(c(1,1,1)),sa.lognormals,0.1))

