View source: R/FRR_HelperFxns.R
print2 | R Documentation |
This function prints messages prefixed with the current timestamp in a standardized format. Messages can be suppressed using the quiet parameter.
print2(text, quiet = FALSE)
text |
A character string containing the message to be printed. |
quiet |
A logical value indicating whether to suppress output. Default is |
The function prepends the current timestamp in "YYYY-MM-DD HH:MM:SS" format to the provided message.
No return value, called for side effect of printing with timestamp.
Sys.time
for the underlying timestamp functionality.
# Print a basic message with timestamp
print2("Processing started")
# Suppress output
print2("This won't show", quiet = TRUE)
# Use in a loop
for(i in 1:3) {
print2(sprintf("Processing item %d", i))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.