Diff Two Vectors
diff_vecs.Rd
A convenient diff tool to determine how and where two character vectors differ.
Usage
diff_vecs(x, y, verbose = interactive())
Value
An invisible list is returned with the set diffs of each vector. The elements of the list are:
- unique_x:
Entries unique to
x
.- unique_y:
Entries unique to
y
.- inter:
The intersect
x
andy
.- unique:
The
union()
ofx
andy
.
Examples
diff_vecs(LETTERS[1:10L], LETTERS[5:15L])
diffs <- diff_vecs(LETTERS[1:10L], LETTERS[5:15L], verbose = FALSE)
diffs
#> $`unique_LETTERS[1:10L]`
#> [1] "A" "B" "C" "D"
#>
#> $`unique_LETTERS[5:15L]`
#> [1] "K" "L" "M" "N" "O"
#>
#> $inter
#> [1] "E" "F" "G" "H" "I" "J"
#>
#> $unique
#> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O"
#>