Export a monthly calendar as pdf
Arguments
- year
either an
integer
or acharacter
of length 1. Must have 4 characters (e.g. '2024' and not '24'). Default is the current year.- month
either an
integer
or acharacter
of length 1. Must have 1 or 2 characters (e.g. '01' or '1'). Default is the current month.- path
a
character
of length 1. The directory to save thepdf
file. Must exist. Default is the current directory.- filename
a
character
of length 1. The name of thepdf
file. Default iscalendar-YYYY-MM.pdf
(e.g.calendar-2024-04.pdf
).- title
a
character
of length 1. The title of the calendar. Default isMonth YYYY
(e.g.April 2024
).- events
an optional
data.frame
with the following columns:name
, the name of the event,from
, the starting date of the event,to
, the ending date of the event, andcategory
, the category of the event.- weekend
a
logical
. IfTRUE
(default) keeps Saturdays and Sundays.- palette
a
character
vector of colors for the events. If only one color is provided (default), all events will have this color. If several colors are provided, the number of colors inpalette
must be equal to the total number of event categories (duplicated colors are accepted). Moreover, thepalette
argument must be a named vector, where names match event categories. For example, let's that theevents
object contains two categories (cat_a
andcat_b
), thepalette
argument must be equal topalette = c("cat_a" = "black", "cat_b" = "red")
.- lang
a
character
of length 1. Used to change the default locale (i.e. the language). Default isNULL
(i.e. use the current locale). Depending on the OS and the locale, the output can be weird.- holidays
an optional
data.frame
with the following columns:date
, the date of the holiday, andname
, the name of the holiday. Typically, the output ofget_holidays()
. Default isNULL
.- moon
a
logical
. IfTRUE
adds new/full moon glyph. Default isFALSE
.- specials
an optional
data.frame
with the following columns:date
, the date of the special day, andname
, the name of the special day. These special days will be added at the top of the day box. Default isNULL
.