Logic: Logical operations
Description
Logical operations including low-level helper functions
Usage
disord_logical_negate(x)
disord_logic_disord(e1,e2)
disord_logic_any(e1,e2)
any_logic_disord(e1,e2)
Value
Return a disord object or logical
Arguments
- e1,e2,x
Formal arguments for S4 dispatch: logical
disord object
Methods
- Logic
signature(e1="disord", e2="disord"):
Dispatched to disord_logic_disord()
- Logic
signature(e1="disord", e2="ANY"):
Dispatched to disord_logic_any()
- Logic
signature(e1="ANY", e2="disord"):
Dispatched to any_logic_disord()
Details
Basic low-level logical operations, intended to be called from
S4 dispatch.
These functions return a logical disord object. appropriate.
Consistency is required. The hash is set to be that of the disord
object if appropriate.
Examples
Run this code
a <- disord(1:7)
l <- a>3
sum(l)
any(l)
all(l | !l)
Run the code above in your browser using DataLab