This function lets the user view a progressbar for a 'for' loop.
statusbar(
run = 1,
max.run = 100,
label = run,
msg = "",
type = Sys.getenv("LARES_STATUSBAR"),
start_time = NA,
multiples = 1,
alarm = FALSE
)No return value, called for side effects.
Iterator. for loop or an integer with the current loop number. Start with 1 preferibly
Number. Maximum number of loops
String. With additionaly information to be printed
at the end of the line. The default is run.
Character. Finish message.
Character. Loading type style: equal, domino
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.
Integer. Only print when multiples of N (to avoid) wasting resources on fast and lots of iterations.
Boolean. Ping (sound) when done. Requires beepr.
Other Tools:
autoline(),
bind_files(),
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(),
haveInternet(),
image_metadata(),
importxlsx(),
ip_data(),
json2vector(),
listfiles(),
mail_send(),
msplit(),
myip(),
quiet(),
read.file(),
tic(),
try_require(),
updateLares(),
zerovar()
for (i in 1:9) {
statusbar(i, 9, multiples = 2)
Sys.sleep(0.3)
}
Run the code above in your browser using DataLab