I am new to shiny and I think I have a pretty simple question. I using a downloadHandler
and I want to do some basic text manipulation to the filename. Can someone help me point out my error?
output$downloadbtn <- downloadHandler(
filename = function() {
return(paste(input$first, ".pdf", sep="")) # works correctly
}
# ...
I instead would like to do something like which does not download correctly:
output$downloadbtn <- downloadHandler(
filename = function() {
first = str_to_lower(stri_trans_general(input$first))
return(paste(first, ".pdf", sep="")) # does not work correctly
}
# ...
I know I am almost certainly messing up something with the reactivity, but I'm not sure how I should go about fixing this issue. Any advice would be appreciated.