Hi, I have the following vectors:
v1 <- rep( LETTERS[ 1:4 ], each = 5) v2 <- c( letters[ 1:10 ], letters[ 1:10 ] ) Notice that: > tapply( B, A, I ) $A [1] "a" "b" "c" "d" "e" $B [1] "f" "g" "h" "i" "j" $C [1] "a" "b" "c" "d" "e" $D [1] "f" "g" "h" "i" "j" Here we can see there are two groups of values: *abcde* and *fghij*. This two groups can have elements in different order so: *abcde* is consider in the same group as *ebcda*. I want to obtain the following information: "There are two groups in vector *v2*, corresponding to levels "A" and "C" in vector *v1*" Any idea? Thanks [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.