Skip to contents

Infix operator that checks, for each row of x, whether a row with the same (Package, Version) exists in y. If a match is found but any other canonical fields differ, a warning is issued. Returns a logical vector of length nrow(x).

Row identity is based on pkg_index row names, which are always "Package (Version)".

Usage

x %pkg_in% y

Arguments

x

A pkg_index (left-hand side).

y

A pkg_index (right-hand side).

Value

A logical vector: TRUE if (Package, Version) in x exists in y.

Examples

x <- as_pkg_index(data.frame(Package=c("foo","bar"), Version=c("1.0","2.0")))
y <- as_pkg_index(data.frame(Package="foo", Version="1.0"))
x %pkg_in% y
#> [1]  TRUE FALSE