是否可以在使用闪亮的程序包时添加自己的csv或txt文件,以制作自己的仪表板进行可视化

时间:2019-01-30 07:11:47

标签: r shiny shinydashboard

我正在使用闪亮的仪表板包准备仪表板,现在我想添加数据以准备可视化。如何实现它。这是应用程序的布局计划。

    ui <- dashboardPage(
  dashboardHeader(title = "Row layout"),
  dashboardSidebar(),
 dashboardBody()
)


 server <- function(input, output) { 

driver.csv <- read.csv("E:/RMARKDOWN/driver.csv.csv", fileEncoding = "UTF-8")

  New_DataSet1<-data.frame(driver.csv$ï..Year_AG,driver.csv$Severity_Desc,driver.csv$Injury.Type)
  New_DataSet1

  latest <- New_DataSet1[1:100,]
  latest

  d <- aggregate(latest$driver.csv.Injury.Type,  by=list(chkID = latest$driver.csv.Severity_Desc), FUN=sum)
  #barplot(d)
  renderplot(d$x)
  #barplot(d$x, xlab = d$chkID)
 # barplot(d$x, names.arg = d$chkID)

 }

 shinyApp(ui,server)

0 个答案:

没有答案