[R] matching pairs regardless of order

Juliane Struve juliane_struve at yahoo.co.uk
Fri Sep 18 14:47:24 CEST 2009


Dear list,
 
I am using match() to match pairs of locations, e.g. trip="loc1,loc2" from a list of such pairs, e.g. list=("loc1,loc2", "loc1,loc3", "loc2,loc3","loc2,loc1"). 
 
In this example match() will match "trip" with the first element of "list", but not the 4th, because the order is reversed. 
 
How can I get a match with both ?
 
Many thanks for any help,
 
Juliane 







More information about the R-help mailing list