Are you trying to integrate a calendar into your R project?
Well, as you surely found out, R has a solution for everything. Moreover you won’t have to worry about advanced coding in HTML,CSS or JavaScript, you will only need basic knowledge of R.
In this post I will show an example of how to create an interactive calendar with R.
What is the perfect day?
Stop laying all the day watching Netflix, is it important to fulfill the day with activities. I am not saying you must work all day, but take your time also to integrate what makes you good.
Here is an example of a day:
This great visualization tool for render an interactive calendar is provided by the package toastui
.
This package among providing this great calendar, is used to build grid and chart. Basically it traduces in R the implementation of Toast UI, a JavaScript UI library (free open source).
Here’s an example of an empty month calendar:
Setting yours it’s really simple. As you can see from the code below is pretty intuitive:
#remotes::install_github("dreamRs/toastui")
library(toastui)
toastui::calendar( #initiate calendar
view = "month") %>% #week or day
cal_schedules( #add a schedule
title = "Spritz with the friends",
start = "2021-11-20 19:30:00",
end = "2021-11-20 20:30:00",
color = "#760C05", #font-color
bgColor = "#E16036", #background-color
borderColor = "#E16036"
)