[R] show equal entries in data.frame
Martin Batholdy
batholdy at googlemail.com
Wed Sep 7 14:15:30 CEST 2011
Hi,
I have the following data-frame:
x <- data.frame(first = c('a','c','k','b'), second = c('b','k','a','j'), third = c('f','a','h','b'))
first second third
1 a b f
2 c k a
3 k a h
4 b j b
Now I would like to see wether there are entries that exists in all three columns.
In the example data-frame this would be true for 'a' and 'b'
(so the row-number of the element is not important).
can someone help me on this?
thanks!
More information about the R-help
mailing list