Learn R Programming

container (version 1.0.5)

OpsLogic: Logic Operators

Description

Binary logic operators for Container() objects and derived classes.

Usage

# S3 method for Dict
&(x, y)

# S3 method for Dict |(x, y)

# S3 method for Set &(x, y)

# S3 method for Set |(x, y)

Arguments

x, y

Depending on the operator at least one must be of class Container() or the respective derived class and the other at least be coercible to the respective class.

Examples

Run this code
d1 = dict(a = 1, b = 2)
d2 = dict(a = 10, x = 4)
d1 & d2      # {a = 1}

Run the code above in your browser using DataLab