compare_sets: Compare two vectors using R's set operations

View source: R/vectors.R

compare_setsR Documentation

Compare two vectors using R's set operations

Description

Compare two vectors using R's set operations

Usage

compare_sets(x, y)

Arguments

x, y

vectors to compare

Value

a list with lengths (the lengths of the other elements), x, y, unique(x), unique(y), setequal(x, y), setdiff(x, y), setdiff(y, x), intersect(x, y), union(x, y).

Examples

yours <- c(1, 2, 3, 4, 4)
mine <- c(3, 5, 6, 4)
compare_sets(yours, mine)

tjmahr/tjmisc documentation built on Feb. 8, 2023, 12:21 p.m.