print2 {fastrerandomize} | R Documentation |
Print timestamped messages with optional quieting
Description
This function prints messages prefixed with the current timestamp in a standardized format. Messages can be suppressed using the quiet parameter.
Usage
print2(text, quiet = FALSE)
Arguments
text |
A character string containing the message to be printed. |
quiet |
A logical value indicating whether to suppress output. Default is |
Details
The function prepends the current timestamp in "YYYY-MM-DD HH:MM:SS" format to the provided message.
Value
No return value, called for side effect of printing with timestamp.
See Also
Sys.time
for the underlying timestamp functionality.
Examples
# 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))
}
[Package fastrerandomize version 0.2 Index]