【问题标题】:Sorting Result In ShinyAppShinyApp中的排序结果
【发布时间】:2017-12-04 16:26:43
【问题描述】:

我有一个 shinyApp,我想对我的相关列进行排序(递减)。 这是我的应用程序:https://abdalmoamen95.shinyapps.io/Correlation/

这是我的服务器代码:

server <- function(input,output){
  output$Itemcorr <- renderTable({
    subset(DF, DF$FirstItem == input$Item)
  })
}

【问题讨论】:

    标签: r shiny shinydashboard


    【解决方案1】:

    我推荐使用 dplyr 包。

    library(dplyr)
    server <- function(input,output){
      output$Itemcorr <- renderTable({
       DF %>% filter(FirstItem == input$Item) %>% arrange(desc(X.Correlation))
      })
    }
    

    【讨论】:

    猜你喜欢
    • 2018-05-20
    • 2020-07-04
    • 2017-04-15
    • 1970-01-01
    • 2010-11-03
    • 2014-06-04
    • 1970-01-01
    • 2013-01-26
    • 1970-01-01
    相关资源
    最近更新 更多