manage_procedure: Printing and timing utility for managing processes

View source: R/manage_procedure.R

manage_procedureR Documentation

Printing and timing utility for managing processes

Description

Printing and timing utility for managing processes

Usage

manage_procedure(part = c("Start", "End"), ..., timer = NULL, verbose = TRUE)

get_duration(timer)

Arguments

part

character scalar, either Start or End.

...

character strings to print. Default messages will print if no arguments are provided.

timer

a proc_time object. Required for manage_procedure only if using the default message for part = "End" default message.

verbose

logical. Print to console?

Value

For part = "Start", a proc_time object (i.e., a timer passable to an eventual part = "End" command); for part = "End", invisible

Examples


manage_procedure("Start", "String will be printed\n")
timer <- manage_procedure(
"Start", "Printing a string is optional", verbose = FALSE
)

## Default starting message
manage_procedure("Start")

## Default ending message
manage_procedure("End", timer = timer)

## Other examples
get_duration(timer)
manage_procedure("End", "Custom ending message")


PAutilities documentation built on Aug. 21, 2022, 9:05 a.m.