Skip to content

Returning vector of values shared across 3 vectors?

2 messages · jim holtman, Brian Diggs

#
try this:
[1]  4  5  6  7  8  9 10 11 12 52

        
On Sat, Oct 1, 2011 at 2:00 AM, Chris Conner <connerpharmd at yahoo.com> wrote:

  
    
2 days later
#
On 10/1/2011 3:03 AM, jim holtman wrote:
Or if your real problem may go to more vec's and you don't want to keep 
nesting the calls:

Reduce(intersect, list(vec1, vec2, vec3))
# [1]  4  5  6  7  8  9 10 11 12 52