normalize            package:compositions            R Documentation

_N_o_r_m_a_l_i_z_e _v_e_c_t_o_r_s _t_o _n_o_r_m _1

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

     Normalize vectors to norm 1.

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

     normalize(x,...)
     ## Default S3 method:
     normalize(x,...)

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

       x: a dataset or a single vector of some type

     ...: currently not used, intended to select a different norm

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

     The vectors given, but normalized to norm 1.

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

     'norm'

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

     data(SimulatedAmounts)
     normalize(c(1,2,3))
     normalize(acomp(c(1,2,3)))
     norm(normalize(acomp(sa.groups)))

