Learn R Programming

Kmisc (version 0.5.0)

matches: Count Matches

Description

This function returns a matrix of matches between each argument passed. Each cell x_ij in the output denotes how many times the elements in input i were found in input j.

Usage

matches(...)

Arguments

...
A set of (possibly named) arguments, all of the same type.

Examples

Run this code
x <- c("a", "b", "c", "d")
y <- c("a", "b", "c")
z <- c("a", "b", "d")
matches(x, y, z)

Run the code above in your browser using DataLab