overlap: Assess overlap in vectors

Description Usage Arguments Value Examples

Description

Useful for learning the overlap of absolute and unique values between two vectors of the same type. They do not have to be the same length, and are allowed to contain NAs.

Usage

1
overlap(x1, x2, na.rm = F, wordy = T, x1name = NULL, x2name = NULL)

Arguments

x1

vector of same class as x2

x2

vector of same class as x1

na.rm

logical, remove NAs from analysis

wordy

logical, prints convenience information

Value

summary data.frame

Examples

1
2
3
4
5
x1 <- sample(1:50, 40, replace=T)
x2 <- sample(c(1:60, rep(NA, 30)), 55, replace=T)
overlap(x1, x2, na.rm=T)
overlap(x1, x2)
overlap(mtcars$gear, mtcars$cyl, x1name='gear', x2name='cyl')

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.