Learn R Programming

lares (version 4.8.4)

statusbar: Progressive Status Bar (Loading)

Description

This function lets the user view a progressbar for a 'for' loop.

Usage

statusbar(
  run = 1,
  max.run = 100,
  label = run,
  msg = "DONE",
  type = "equal",
  start_time = NA
)

Arguments

run

Iterator. for loop or an integer with the current loop number. Start with 1 preferibly

max.run

Number. Maximum number of loops

label

String. With additionaly information to be printed at the end of the line. The default is run.

msg

Character. Finish message

type

Character. Loading type style: equal, domino

start_time

POSIXct. Start time to consider. If NA, then when first iteration starts will be set as start time. Useful for when first iteration is showed as done but started a few seconds/minutes ago.

See Also

Other Tools: autoline(), bindfiles(), bring_api(), db_download(), db_upload(), export_plot(), export_results(), get_credentials(), h2o_predict_API(), h2o_predict_MOJO(), h2o_predict_binary(), h2o_predict_model(), h2o_selectmodel(), h2o_update(), haveInternet(), image_metadata(), importxlsx(), ip_country(), iter_seeds(), json2vector(), listfiles(), mailSend(), msplit(), myip(), pass(), quiet(), read.file(), tic(), try_require(), updateLares(), zerovar()

Examples

Run this code
# NOT RUN {
for (i in 1:5) {
  statusbar(i, 5)
  Sys.sleep(0.5)
}
# }

Run the code above in your browser using DataLab