I'm new with shiny and I just want to know the code to convert my URL column into hyperlinks and how to use selectizeInput to select a column in the table.
I have checked different questions here but nothing worked.
tabItem(tabName = "project",
h2("I will add the project description and institiute logo here")),
tabItem(tabName = "data",
fluidPage(
fluidRow(
box(title = "Fetch Data",selectizeInput(
"show_vars",
"Columns to show:",
choices = colnames(data.input),
multiple = TRUE), downloadButton("downloadData", "Download table"), status="primary", solidHeader = T,collapsible = T, width = 2 ),
box( title = "Data table", status = "primary",solidHeader = T, collapsible = T,width = 10,
fluidPage(width=13,height=900,
withSpinner(DT::dataTableOutput("data"))
)
))))
)))
server <- function(input, output) {
data <- read.csv("Drug-data.csv", header = T)
output$data <- DT::renderDataTable({
datatable(cbind.data.frame(data),filter = "top",rownames = F,
options=list(autoWidth =T,dom='Bfrtrip',paging=T,pageLength=5,scroller=T,scrollX=T,scrollY=700,
columnDefs = list(list(width = "175px", targets = "_all")),searching=F ),
extensions = list("Scroller"))
})
output$downloadData <- downloadHandler(
filename = function() {
paste("TECHNOMISE RapidAIM data", Sys.Date(), ".csv", sep="")
},
content = function(file) {
write.csv(data, file)
}
)
runjs('
var el2 = document.querySelector(".skin-blue");
el2.className = "skin-blue sidebar-mini";
')
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…