R/debug_msg.R

Defines functions debug_msg

# A helper function that appends a time stamp to a message and prints it to the
# R terminal; the message is formed by pasting together all input arguments
debug_msg <- function(..., ending_newline = TRUE) {
    user_msg <- paste(...)

    full_msg <- paste0(
        '\nTime: ',
        Sys.time(),
        '    ',
        user_msg,
        if (ending_newline) {'\n'} else {''}
    )

    cat(full_msg)
}

Try the PhotoGEA package in your browser

Any scripts or data that you put into this service are public.

PhotoGEA documentation built on June 12, 2025, 5:08 p.m.