如何在R Studio中绘制数据表中的选定行

时间:2019-06-05 11:22:36

标签: r datatable shiny

我有一个包含+2000行的数据表。是否可以选择一行并将其绘制成时间

表的第一行:

enter image description here

我要使用以下代码计算计数(数据框中每个元素的外观)

output$x1 <- DT::renderDataTable(
     {
    closed_srs3 %>%
    group_by_(input$buttons) %>%
    summarize(count = n()) %>%
    arrange(desc(count))    
     })

来自以下数据框

> dput(head(closed_srs3)){

structure(list(Name = c("DASOVOUNIX", "MYSTEGNA_X", "PETROCHORI_SAR", 
"AGNIK_SAR", "GARDIKI-X", "AMOELATOPOS"), Id = c(3311, 1632, 
4779, 4796, 4291, 1449), Date = structure(c(1548892800, 1548892800, 
1548892800, 1548892800, 1548892800, 1548460800), class = c("POSIXct", 
"POSIXt"), tzone = "UTC"), Created = structure(c(1548892800, 
1548892800, 1548892800, 1548892800, 1548892800, 1548460800), class = c("POSIXct", 
"POSIXt"), tzone = "UTC"), Closed = structure(c(1548979200, 1548979200, 
1548979200, 1548979200, 1548979200, 1548979200), class = c("POSIXct", 
"POSIXt"), tzone = "UTC")), row.names = c(NA, -6L), class = c("tbl_df", 
"tbl", "data.frame"))}

0 个答案:

没有答案