This question was posed on R-Help; for the following data, "I would like to perform a simple matching but only row 1 compared to row 1, row 2 compared to row 2 (paired).......giving back a number as dissimilarity for each comparison."
R-Cookbook.com is a collection of "recipes"--problems, solutions, and working examples--contributed by the R community in order to share code, promote the use of R, and make the learning process more efficient for new users.