I can't make the delay of with progress as much as the download of the report.
progreso <- reactive({
input$guardarReporte
# insolate({
withProgress({
setProgress(message = "Descargando...")
})
})
#####------RENDER GUARDAR REPORTE
output$guardarReporte <- downloadHandler(
filename = function() {
progreso()
paste('reporte_Mayllay', sep = '.', switch(
input$formato, PDF = 'pdf', HTML = 'html', Word = 'docx'
))
},
content = function(file) {
src <- normalizePath('report.Rmd')
owd <- setwd(tempdir())
on.exit(setwd(owd))
file.copy(src, 'report.Rmd', overwrite = TRUE)
out <- render('report.Rmd', switch(
input$formato,
PDF = pdf_document(), HTML = html_document(), Word = word_document(),
))
file.rename(out, file)
}
)
I need help with the development of withProgress to take the same time it takes to generate the report