common: Looks which element of a vector two vectors have in common

Description Usage Arguments Value Examples

View source: R/common.R

Description

Looks which element of a vector two vectors have in common

Usage

1

Arguments

x

Vector to search in.

pattern

Pattern to find in x. can either be a single element or a vector

Value

A vector contains the elements that the two vectors have in common.

Examples

1
2
3
4
test1 <- c("A1", "A2", "A3", "A4", "A5")
test2 <- c("A1", "A2", "A3", "B4", "B5")

common(test1, test2)

Larsdegroot/influenzaData documentation built on Dec. 18, 2021, 4:31 a.m.