grapes-and-and-grapes: A short-circuit evaluation-like function similar to 'bash"s...

%&&%R Documentation

A short-circuit evaluation-like function similar to bash's && operator.

Description

The right-hand side (y) is only evaluated if the left-hand side (x) is identical to TRUE. Useful for verbosity (verbose %&&% message("Hello world!")).

Usage

x %&&% y

Arguments

x

A logical scalar: left-hand side argument.

y

A right-hand side expression.

Value

y if x is TRUE, else invisible(NULL)

Examples

TRUE %&&% message("printed")
FALSE %&&% message("not printed")

bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.