distpar                 package:amap                 R Documentation

_P_a_r_a_l_l_e_l_i_z_e_d _D_i_s_t_a_n_c_e _M_a_t_r_i_x _C_o_m_p_u_t_a_t_i_o_n

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

     This function computes and returns the distance matrix computed by
     using the specified distance measure to compute the distances
     between the rows of a data matrix.

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

     distpar(x, method = "euclidean", nbproc = 2, diag = FALSE, upper = FALSE)

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

       x: numeric matrix or (data frame).  Distances between the rows
          of 'x' will be computed.

  method: the distance measure to be used. This must be one of
          '"euclidean"', '"maximum"', '"manhattan"', '"canberra"',
          '"binary"', '"pearson"', '"correlation"' or '"spearman"'. Any
          unambiguous substring can be given.

  nbproc: Integer, Number of subprocess for parallelization

    diag: logical value indicating whether the diagonal of the distance
          matrix should be printed by 'print.dist'.

   upper: logical value indicating whether the upper triangle of the
          distance matrix should be printed by 'print.dist'.

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

     An object of class '"dist"'.

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

     'Dist'

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

     x <- matrix(rnorm(100), nrow=5)

     ## compute dist with 8 threads
     distpar(x,nbproc=8)

     ## compute pearson dist with 8 threads
     distpar(x,nbproc=8,method="pearson")

