I have a small shiny app in shinyapps.io with a database that stores products. I want to re-deploy the app everytime the database gets new data so the shiny app shows up-to-date products. Since this will happen quite often, I want to see the progress everytime the app gets re-deployed. How can I put a progress bar at the beginning and end of my R script? Most of the examples I see online are with loops but I couldn't find anything that work with scripts. Example below:
#Start of progress bar
library(rsconnect)
rsconnect::setAccountInfo(name='joe',
token='1AC4D3B9061349DC',
secret='euAUwk6tOJg4IMztzSz3oBz')
rsconnect::deployApp(account = 'joe',
appDir = file.path(getwd()),
appFiles = c("app.R", "deer.db", "setPlace.R"),
appId = "11278568")
#End of progress bar
"R" progress barreturns many good really good examples, including theprogresspackage. While most of the examples do showforloops, there's every indication that you can usepb$tick()in as many places as you need. I get that you said you found some online and they all demonstrated loops, I don't see anything inprogress,progressr, nor even inutils::txtProgressBarthat suggests it must be used inside of a loop.