I developed my Shiny apps in Windows. All features (including copy-to-clipboard and download buttons) work as expected.
However, when I deploy it in our Shiny Server (ubuntu), the copy-to-clipboard and download buttons fail.
Thanks very much for your help!
shiny::observeEvent(input$copy_cross, {
clipr::write_clip(eval(parse(text = "x = as.data.frame.matrix(table(sel()[,1],sel()[,2]))")), row.names= T, col.names = NA)
})
output$download_cross <- shiny::downloadHandler(
filename = function() {paste("Crosstabs (Counts).xlsx")},
content = function(file) {
openxlsx::write.xlsx(x = as.data.frame.matrix(table(sel()[,1],sel()[,2])), file, sheetName = "Crosstabs", row.names= T, col.names = T, append=F)
}
)