quasieuclid               package:ade4               R Documentation

_T_r_a_n_s_f_o_r_m_a_t_i_o_n _o_f _a _d_i_s_t_a_n_c_e _m_a_t_r_i_c_e _t_o _a _E_u_c_l_i_d_e_a_n _o_n_e

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

     transforms a distance matrix in a Euclidean one.

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

     quasieuclid(distmat)

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

 distmat: an object of class 'dist'

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

     The function creates a distance matrice with the positive
     eigenvalues of the Euclidean representation. 
       Only for Euclidean distances which are not Euclidean for numeric
     approximations (for examples, in papers as the following example).

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

     object of class 'dist' containing a Euclidean distance matrice

_A_u_t_h_o_r(_s):

     Daniel Chessel chessel@biomserv.univ-lyon1.fr

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

     data(yanomama)
     geo <- as.dist(yanomama$geo)
     is.euclid(geo) # FALSE
     geo1 <- quasieuclid(geo)
     is.euclid(geo1) # TRUE
     par(mfrow = c(2,2))
     lapply(yanomama, function(x) plot(as.dist(x), quasieuclid(as.dist(x))))

     par(mfrow = c(1,1))

