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