I have a form with an active button, the problem is that I want reset the button in this form output$exampleFasta = 0
but it throw a exception, how can I change the data of variable? or if exist something like renderImage that can give info to specific attribute like the id.
index.html
<form class="span12 menu-med-upload">
<div class="row-fluid">
<h3>Upload File .fasta</h3>
<div class="custom-input-file btn btn-inverse">
<input type="file" size="1" name="fileFasta" id="fileFasta" class="input-file" />
Select File
</div>
<img src="/static/img/check.png" class = "custom-input-check">
<div class="span12"></div>
<textarea class = "span12" rows = "10" style="resize: none;" id="textAreaFasta">
</textarea>
</div>
<button id="uploadFasta" type="button" class="btn btn-inverse action-button" >Upload File</button>
<button id="exampleFasta" type="button" class="btn btn-inverse action-button" >Example</button>
</form>
server.R
output$table <- renderText({
if(input$exampleFasta != 0 && input$uploadFasta == 0){
return(myRenderTable(matrixProteinExample(),"table",""))
}
if(input$uploadFasta != 0){
return(myRenderTable(matrixProtein(),"table",nameFile))
}
})
change with something likes this. but this is wrong.
output$table <- renderText({
if(input$exampleFasta != 0 && input$uploadFasta == 0){
output$exampleFasta <- 0
return(myRenderTable(matrixProteinExample(),"table",""))
}
if(input$uploadFasta != 0){
return(myRenderTable(matrixProtein(),"table",nameFile))
}
})