You can create a yearly calendar in R with the calendR
package. Specify the year in the year
argument. If no year is specified a calendar of the current year will be created.
# install.packages("calendR")
library(calendR)
# Specify the year
calendR(year = 2020)
The default calendar is in horizontal mode (three rows and four columns), but the orientation
argument allows you to to create a vertical calendar with three columns and four rows setting the argument to "p"
or "portrait"
.
# install.packages("calendR")
library(calendR)
# Vertical calendar
calendR(orientation = "p")
You can also customize more arguments to modify the background color of the months name, the color of some days, the adjustment of the month names, among others. Type ?calendR
for the full list.
# install.packages("calendR")
library(calendR)
calendR(year = 2021, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = c(1, 50, 12, 125, 80, # Color days of the year
99, 102, 205, 266, 360),
special.col = "pink", # Color of the special.days
months.pos = 0.5) # Horizontal alignment of the month names
See also