I have a bit of code from a shinyapp that determines what will be exported to a pdf document:
special_ortho_table <- reactive({
if(input$ortho == "yes"){
sp_ortho_table <- drugsUI %>%
filter(Ortho == "yes", Special_ortho == TRUE) %>%
select(Name, Recommendations)
}else{
sp_ortho_table <- drugsUI[0,]
names(sp_ortho_table) <- c("", "", "", "")
}
return(sp_ortho_table)
})
output$ortho_table <- renderTable({
xtable(special_ortho_table())
})
The corresponding code in rmd is:
xtable(special_ortho_table())
You can see that I tried to remove the column names but the pdf still produces a blank table with horizontal borders. Is there any way that I can remove the borders, if not, can anyone suggest a work around that would allow me to leave something that is blank when input$ortho == "no"
?