distancia               package:dprep               R Documentation

_V_e_c_t_o_r-_V_e_c_t_o_r _E_u_c_l_i_d_i_e_a_n _D_i_s_t_a_n_c_e _F_u_n_c_t_i_o_n

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

     Finds the euclidean distance between two vectors x and y, or  the
     matrix y and the vector x

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

     distancia(x, y)

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

       x: numeric vector

       y: numeric vector or matrix

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

     Does not support missing values. If y is a column of a vector, the
     transpose must be used.

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

distancia: numeric value representing the Euclidean distance between x
          and y, or a row matrix representing the Euclidean distance
          between x and each column of y. 

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

     Caroline Rodriguez and Edgar Acuna

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

     #---- Calculating distances
     x=rnorm(4)
     y=matrix(rnorm(12),4,3)
     distancia(x,t(y[,1]))
     distancia(x,y)

