grapes-greater-than-greater-than-grapes: Extraction/Output Operator

Description Usage Arguments Details See Also Examples

Description

Extract a message to output

Usage

1
lhs %>>% rhs

Arguments

lhs

Either a message type identifier like "@info" or an entire message.

rhs

Optional if operator is used with function syntax

Details

This operator provides a programmatic use for logdec outside the context of comments. However, it should be noted that this operator is essentially a wrapper around the engine-specific function call, i.e. cat(), cli::cli_alert_*(), etc.

See Also

output

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Conventional Use:
"@info" %>>% "Output some form of informational message"
"" %>>% "This will also work, but is a bit odd"

# Functional Use:
`%>>%`("@success Successfully outputted this!")
`%>>%`("@success", "Outputted again!")

# Additional Use:
options(logdec.engine = "cli")
"@info" %>>% "You can change the logdec engine with {.fn {options()}}"
"@info" %>>% "As seen above, you can also use {.pkg glue} syntax too!"

some_value <- rnorm(1)
"@success" %>>% "Since you can use glue, you can pass variables {some_value}."

## End(Not run)

program--/logdec documentation built on Dec. 22, 2021, 9:53 a.m.