mintersect: Set intersection of arbitrary number of arguments

Description Usage Arguments Details Value Author(s) Examples

View source: R/mintersect.R

Description

Set intersection of arbitrary number of arguments.

Usage

1

Arguments

...

arguments to be intersected, vectors of the same mode, see intersect.

Details

The base R function intersect is a binary operation. mintersect works with any positive number of arguments.

If called with one argument, mintersect returns it. This is unlike intersect which gives an error in this case.

Calling mintersect with no arguments is an error (as it is for intercect).

Value

a vector representing the intersection of the arguments

Author(s)

Georgi N. Boshnakov

Examples

1
2
3
mintersect(1:20, 3:18, 7:12)
mintersect(letters[1:20], letters[3:18], letters[7:12])
mintersect(1:4)

gbutils documentation built on May 2, 2019, 3:38 p.m.