Debian Codegraph @

R/vector.R

raw
1
2 # these functions are like the base R equivalents, but preserve names
3 renv_vector_diff <- function(x, y) {
4 x[match(x, y, 0L) == 0L]
5 }
6
7 renv_vector_intersect <- function(x, y) {
8 y[match(x, y, 0L)]
9 }
10
11 renv_vector_unique <- function(x) {
12 x[!duplicated(x)]
13 }