iterCount: Simple Text Iteration Counter

View source: R/logging.R

iterCountR Documentation

Simple Text Iteration Counter

Description

Simple Text Iteration Counter

Usage

iterCount(n = 100, i0 = 0L, title = "Iterations", extra = NULL, verbose = TRUE)

Arguments

n

number of total steps

i0

starting step

title

character string to use as title

extra

character vector providing extra text to add at each step

verbose

logical that toggles the counter

Value

A function that can be used to increment progress.

Examples


progress <- iterCount(LETTERS)
res <- sapply(LETTERS, function(x){
 Sys.sleep(.1)
	progress()
})
# terminate counter
i_end <- progress(NULL)
i_end 


pkgmaker documentation built on May 3, 2023, 5:08 p.m.

Related to iterCount in pkgmaker...