【发布时间】:2019-09-25 23:46:03
【问题描述】:
我必须在 RStudio 上自动分析数据集。
我的问题是我不知道数据集中会有多少系列。所以我想知道是否可以在 Highcharts 内部做一个 for 循环?
我不知道它不起作用是因为我做错了什么还是因为它不可能。
output$hc2 <- renderHighchart ({
Hchc <- highchart(hcaes(x = Spring ,y = Ponctuation)) %>%
hc_title(text = "Cumulation of the result of a Team per spring",
margin = 20, align = "left",
style = list(color = "#FE8000", useHTML = TRUE)) %>%
hc_xAxis(categories = tableA$Spring, title = list(text = "Number of spring",color = "#FE8000")) %>%
hc_yAxis(title = list(text = "Cumulation of the result", color = "#FE8000"))%>%
for (i in length(mylist)){
hc_add_series(name = name[i], data = mylistcumu[[i]]$CumuPonct) }
print(Hchc)})
【问题讨论】:
标签: r loops highcharts rstudio shinydashboard