[R] matching pairs in a Dataframe?

Singu singularitaet at gmx.net
Wed Aug 16 19:02:32 CEST 2006


Dear list,

I want to extract pairs of values out of a dataframe where one
criteria/condition does match.

I have an experiment with 3 conditions which were not always applied:

e.g.:

group   cond   x
A         1         2
A         2         4
A         3         6.5
B         1         3
B         2         4.5
C         1         2.5
C         3         4
D         2         5
D         3         6
E         1         1
E         2         4
E         3         6


Now I wanted to extract the x of those groups where condition 2 and
condition 3 do both exist.

In this example that would be groups A, D and E and the extracted pairs
e.g.:
cond2   cond3
4         6.5
5         6
4         6

(I need this for a wilcoxon test)

I would be happy if one could give me a hint, probably its very simple...

Thanks
Stefan Grosse



More information about the R-help mailing list