statusbar | R Documentation |
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
)
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 |
msg |
Character. Finish message. |
type |
Character. Loading type style: equal, domino, sword, filled. |
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. |
multiples |
Integer. Only print when multiples of N (to avoid) wasting resources on fast and lots of iterations. |
alarm |
Boolean. Ping (sound) when done. Requires |
No return value, called for side effects.
Other Tools:
autoline()
,
bind_files()
,
bring_api()
,
chr2num()
,
db_download()
,
db_upload()
,
export_plot()
,
export_results()
,
files_functions()
,
font_exists()
,
formatColoured()
,
formatHTML()
,
get_credentials()
,
glued()
,
grepm()
,
h2o_selectmodel()
,
haveInternet()
,
image_metadata()
,
importxlsx()
,
ip_data()
,
json2vector()
,
list_cats()
,
listfiles()
,
mail_send()
,
markdown2df()
,
move_files()
,
msplit()
,
myip()
,
quiet()
,
read.file()
,
tic()
,
try_require()
,
updateLares()
,
warnifnot()
,
what_size()
for (i in 1:9) {
statusbar(i, 9, multiples = 2)
Sys.sleep(0.3)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.