gpt4 book ai didi

r - 如何为 R Shiny 应用程序制作 "Calendar"?

转载 作者:行者123 更新时间:2023-12-01 21:58:53 24 4
gpt4 key购买 nike

有很多 JS 库可用于在 Web 应用程序中制作日历。

如何为 R Shiny 应用程序制作一个带有日期标签的优雅日历解决方案,就像在 Google 日历中一样?

谢谢!

最佳答案

看看 fullcalendar在github上打包,或者你可以Add a Google calendar to your website

library(shiny)
library(fullcalendar)

data = data.frame(title = paste("Event", 1:3),
start = c("2017-03-01", "2017-03-01", "2017-03-15"),
end = c("2017-03-02", "2017-03-04", "2017-03-18"),
color = c("red", "blue", "green"))

ui <- fluidPage(
column(6,
fullcalendarOutput("calendar", width = "100%", height = "200px")
)
)

server <- function(input, output) {
output$calendar <- renderFullcalendar({
fullcalendar(data)
})
}

shinyApp(ui, server)

enter image description here

关于r - 如何为 R Shiny 应用程序制作 "Calendar"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54579037/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com