matchpt package:Biobase R Documentation _F_i_n_d_s _N_e_a_r_e_s_t _N_e_i_g_h_b_o_u_r_s _f_o_r _S_e_t_s _o_f _P_o_i_n_t_s _g_i_v_e_n _b_y _N_x_D _C_o_o_r_d_i_n_a_t_e_s _D_e_s_c_r_i_p_t_i_o_n: Finds nearest neighbours (using Euclidian distance) for sets of points given by coordinates. Can be used to match one dataset agains another or to locate nearest neighbours within a single dataset. _U_s_a_g_e: matchpt(x, y = NULL) _A_r_g_u_m_e_n_t_s: x: A matrix (or a vector) of coordinates. Rows represent different points in ND space, where N is the number of columns, and thus coordinates. If argument y is not given, match will be performed within x-dataset. y: If given a matrix (or a vector) of the same space (same N), that could however have different number of points. If given this argument is used to match x against it. _V_a_l_u_e: A matrix of 2 columns and n rows, where n is the number of points in argument x. First column - index of the nearest neighbour, second column - distance to the nearest neighbour. If y is given, index corresponds to the index in y-dataset, if only x is given, then in x. _A_u_t_h_o_r(_s): Oleg Sklyar, osklyar@ebi.ac.uk _S_o_u_r_c_e: The C code for this routine is available in 'src/matchpt.c' of this package. _R_e_f_e_r_e_n_c_e_s: Oleg Sklyar, EBI 2006 _E_x_a_m_p_l_e_s: a <- matrix(c(2,2,3,5,1,8,-1,4,5,6), ncol = 2, nrow = 5) matchpt(a) b <- c(1,2,4,5,6) d <- c(5.3, 3.2, 8.9, 1.3, 5.6, -6, 4.45, 3.32) matchpt(b, d) matchpt(d, b)