...I have a dataframe consist of 100 samples. There are three column, one url link, second a name or a heading to the url link and third date. I want to display all those headings in shiny interface. Clicking which leads the user to the respective link page.
Filter samples through selected date. But I am getting a error
Error in UseMethod: no applicable method for 'filter_' applied to an object of class "c('datatables', 'htmlwidget')" Please help
df$link <- paste0("<a href='", df$url, "' target='_blank'>", df$heading, "</a>")
ui <- fluidPage( dateRangeInput('dateRange',
label = 'Filter news by date',
start = as.Date('2001-01-01') , end = as.Date('2018-06-01')),
DT::dataTableOutput("table")
)
server <- function(input, output) {
output$table <- DT::renderDataTable({
DT::datatable(df[, c("link", "Date"), drop = FALSE], escape = FALSE) %>%
dplyr::filter(df$Date >= input$dateRange[1] & df$Date <= input$dateRange[2])
})
}