Description Usage Arguments Details See Also Examples
Extract a message to output
1 | lhs %>>% rhs
|
lhs |
Either a message type identifier like "@info" or an entire message. |
rhs |
Optional if operator is used with function syntax |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.