r - 如何为 R Shiny 应用程序制作“日历”?
问题描述
有很多用于在 Web 应用程序中制作日历的 JS 库。
如何使用 Google Calendar for R Shiny 应用程序中的日期标签制作优雅的日历解决方案?
谢谢!
解决方案
查看github上的 fullcalendar包,或者您可以将 Google 日历添加到您的网站
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)
推荐阅读
- angular - FB.api() 内的 Angular Cant 调用函数
- azure - 监控到 Azure 负载均衡器的流量
- python - 在 Python 内核中捕获 IPython 输出
- shell - 用于下载 url 列表的脚本
- jekyll - jekyll-theme-primer bootsrap.min 找不到
- sql - 检测到迁移到 Flyway 版本失败
- php - 无法在我的 Linux 服务器中查看重新上传的 php web 文件
- qlikview - 获取在一个语句中加载的多个文件的计数
- apache-spark - How to remove words that have less than three letters in PySpark?
- c# - 以编程方式部署时,带有脚本任务的 SSIS 包不起作用