瀏覽代碼

Shiny skeleton

master
Maxime Wack 6 年之前
父節點
當前提交
20c347ac84
共有 1 個檔案被更改,包括 16 行新增4 行删除
  1. +16
    -4
      app.R

+ 16
- 4
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")

Loading…
取消
儲存