intersectSeveral: Intersect Several

Description Usage Arguments Value Examples

View source: R/ShortFunctions.R

Description

Find intersection of several sets

Usage

1

Arguments

...

Any number of vectors of the same mode

Value

A vector of the same mode as the inputs containing elements that appear in all of the input sets. If there are none, it will return an empty vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ex1 = 6:10
ex2 = (1:5)*3
ex3 = c(1, 10, NA, 6, 2)
ex4 = c(NA, NA, NA, 6, 5)
intersectSeveral(ex1, ex2)
intersectSeveral(ex1, ex3)
intersectSeveral(ex1, ex4)
intersectSeveral(ex2, ex3)
intersectSeveral(ex2, ex4)
intersectSeveral(ex3, ex4)
intersectSeveral(ex1, 7)
intersectSeveral(ex3, 5)
intersectSeveral(ex3, NA)

debarros/dbTools documentation built on Dec. 7, 2018, 2:10 p.m.