print_loop_progress {kim} | R Documentation |
print loop progress
Description
Print current progress inside a loop (e.g., for loop or lapply)
Usage
print_loop_progress(
iteration_number = NULL,
iteration_start = 1,
iteration_end = NULL,
text_before = "",
percent = 1,
output_method = "cat"
)
Arguments
iteration_number |
current number of iteration |
iteration_start |
iteration number at which the loop begins (default = 1) |
iteration_end |
iteration number at which the loop ends. |
text_before |
text to add before "Loop Progress..."
By default, it is set to be blank, i.e., |
percent |
if |
output_method |
if |
Examples
for (i in seq_len(250)) {
Sys.sleep(0.001)
print_loop_progress(
iteration_number = i,
iteration_end = 250)
}
unlist(lapply(seq_len(7), function (i) {
Sys.sleep(0.1)
print_loop_progress(
iteration_number = i,
iteration_end = 7)
return(i)
}))
[Package kim version 0.5.422 Index]