I have a random word listI want the list to be updated by clicking the "aleatorizar" button.I tried placing the renderprint of the list inside the observerEvent of the click "aleatorizar", but it didn't work.What can I do?
example image below
server = function(input,output) {
datatonincanon = reactiveValues(data= NULL)
output$filtrocheck = DT::renderDataTable({
datatonincanon$data = filter(databanco, (databanco$Tonicidade %in% (input$IdTonin) & databanco$Canonicidade %in% (input$IdCanon)))
DT::datatable(datatonincanon$data[,c(-4,-5,-8,-9,-10,-11,-12,-13)],options = list(searching=TRUE),rownames= FALSE)
})
observeEvent ("IdGerar", {
output$Lista = renderPrint({
printf= function(...){
invisible(cat(sprintf(...)))
}
req(datatonincanon$data)
data = datatonincanon$data
printf(as.character(list(sample(data$Palavra, 30))))
})
})