And {lazy.tools}R Documentation

Combine string arguments by a logical infix operator

Description

Combine string arguments by a logical infix operator

Usage

And(..., oper = " & ")

Or(..., oper = " | ")

Not(exp, oper = " | ")

A %&% B

A %|% B

A %&&% B

A %||% B

Arguments

...

strings to be combined.

oper

= "&" or "|" or "&&" or "||"
And uses "&" as the default, Or uses "|" as the default.

exp

a string to be negated by Not.

A

The first string argument

B

The second string argument

Details

And( "a", "b" ) returns "a & b"
Or( "a", "b" ) returns "a | b"
Not( "exp" ) returns "!exp"

And( "a", "b" ) is equivalent to "a" %&% "b"
And( "a", "b", oper="&&" ) is equivalent to "a" %&&% "b"
Or( "a", "b" ) is equivalent to "a" %|% "b"
Or( "a", "b", oper="||" ) is equivalent to "a" %||% "b"

Use eval( parse(text=cond) ) to evaluate the expression.

Value

a string

Examples

And( "a==b", "(c==d)" )
"a==b" %&% "(c==d)"
Or( "a==b", "(c==d)" )
"a==b" %||% "(c==d)"
Or( Not("a"), Not("(b)") )
Not( And("a==b", "(c==d)") )


[Package lazy.tools version 0.1.3 Index]