diff --git a/app.R b/app.R index f029164..eb08cef 100644 --- a/app.R +++ b/app.R @@ -9,11 +9,23 @@ options(DT.options = list(paging = F, dom = "Bfrtip", buttons = c("copy", "excel"))) -url <- "https://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools" +ui <- fluidPage( + inputPanel( + textInput("wiki_url", "Wikipedia comparison page"), + actionButton("go", "Load tables") + ) + ) + +server <- function(input, output, session) +{ + tables <- eventReactive(input$go,{ + GET(url) %>% + content %>% + html_table(fill = T) + }) +} + -GET(url) %>% - content %>% - html_table(fill = T) %>% reduce(inner_join) %>% mutate_if(is.character, factor) %>% datatable(filter = "top")