View source: R/Gibbs_sampler.R
spatopic_message | R Documentation |
Creates consistently formatted messages for the SpaTopic package with timestamps and message type indicators. This function helps standardize all output messages across the package. Error messages will stop execution.
spatopic_message(type = "INFO", message, timestamp = TRUE)
type |
Character string indicating message type (e.g., "INFO", "WARNING", "ERROR", "PROGRESS") |
message |
The message content to display |
timestamp |
Logical; whether to include a timestamp in the message (default: TRUE) |
This function prefixes messages with a timestamp and the SpaTopic tag, creating a consistent message format throughout the package. When type="ERROR", this will stop execution with stop(). When type="WARNING", this will use warning() for non-fatal warnings. All other message types will use message() for informational output.
No return value, called for side effect of displaying a message
## Not run:
spatopic_message("INFO", "Starting analysis...")
spatopic_message("WARNING", "Parameter out of recommended range", timestamp = FALSE)
spatopic_message("ERROR", "Required input missing") # This will stop execution
spatopic_message("PROGRESS", "Processing complete")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.