ContainerS4: S4 methods for Container

ContainerS4R Documentation

S4 methods for Container

Description

Membership operator for Container

Usage

x %in% table

## S4 method for signature 'ANY,Container'
x %in% table

## S4 method for signature 'Container,ANY'
x %in% table

## S4 method for signature 'Container,Container'
x %in% table

Arguments

x

Container objects

table

Container objects

Value

A logical vector indicating if each element of x is found

Examples

co <- container(a = 1, 2, b = 3)
c(1, 3, 5) %in% co                       # TRUE TRUE FALSE
c(x = 1, y = 2, z = 9) %in% co           # c(x = TRUE, y = TRUE, z = FALSE)
list(x = 1, y = 2, z = 9) %in% co        # c(x = TRUE, y = TRUE, z = FALSE)

co2 <- container(a = NA, b = 2)
v <- c(x = 1, y = NA_real_, z = 2)
v %in% co2                               # c(x = FALSE, y = FALSE, z = TRUE)
co2 %in% v                               # c(a = FALSE, b = TRUE)

container documentation built on Nov. 16, 2026, 1:08 a.m.