{"cells":[{"cell_type":"code","execution_count":4,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":["also installing the dependencies 'gridGraphics', 'yulab.utils', 'ggfun', 'ggplotify', 'magick', 'forcats', 'suncalc', 'ggimage', 'gggibbous'\n","\n"]},{"name":"stdout","output_type":"stream","text":["\n"," There are binary versions available but the source versions are later:\n"," binary source needs_compilation\n","ggplotify 0.0.7 0.1.0 FALSE\n","magick 2.7.2 2.7.3 TRUE\n","ggimage 0.2.8 0.3.0 FALSE\n","\n"," Binaries will be installed\n","package 'gridGraphics' successfully unpacked and MD5 sums checked\n","package 'magick' successfully unpacked and MD5 sums checked\n","package 'forcats' successfully unpacked and MD5 sums checked\n","package 'suncalc' successfully unpacked and MD5 sums checked\n","package 'gggibbous' successfully unpacked and MD5 sums checked\n","package 'calendR' successfully unpacked and MD5 sums checked\n","\n","The downloaded binary packages are in\n","\tC:\\Users\\Administrator\\AppData\\Local\\Temp\\RtmpI7GbGs\\downloaded_packages\n"]},{"name":"stderr","output_type":"stream","text":["installing the source packages 'yulab.utils', 'ggfun', 'ggplotify', 'ggimage'\n","\n"]}],"source":["install.packages(\"calendR\")"]},{"cell_type":"code","execution_count":6,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":["Warning message:\n","\"package 'calendR' was built under R version 3.6.3\"~~ Package calendR\n","Visit https://r-coder.com/ for R tutorials ~~\n"]},{"name":"stdout","output_type":"stream","text":["calendR package:calendR R Documentation\n","\n","_\bM_\bo_\bn_\bt_\bh_\bl_\by _\ba_\bn_\bd _\by_\be_\ba_\br_\bl_\by _\bc_\ba_\bl_\be_\bn_\bd_\ba_\br_\bs\n","\n","_\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn:\n","\n"," Create ready to print monthly and yearly calendars. The function\n"," allows personalizing colors (even setting a gradient color scale\n"," for a full month or year), texts and fonts. In addition, for\n"," monthly calendars you can also add text on the days.\n","\n","_\bU_\bs_\ba_\bg_\be:\n","\n"," calendR(\n"," year = format(Sys.Date(), \"%Y\"),\n"," month = NULL,\n"," start_date = NULL,\n"," end_date = NULL,\n"," start = c(\"S\", \"M\"),\n"," orientation = c(\"portrait\", \"landscape\"),\n"," title,\n"," title.size = 20,\n"," title.col = \"gray30\",\n"," subtitle = \"\",\n"," subtitle.size = 10,\n"," subtitle.col = \"gray30\",\n"," text = \"\",\n"," text.pos = NULL,\n"," text.size = 4,\n"," text.col = \"gray30\",\n"," special.days = NULL,\n"," special.col = \"gray90\",\n"," gradient = FALSE,\n"," low.col = \"white\",\n"," col = \"gray30\",\n"," lwd = 0.5,\n"," lty = 1,\n"," font.family = \"sans\",\n"," font.style = \"plain\",\n"," day.size = 3,\n"," days.col = \"gray30\",\n"," weeknames,\n"," weeknames.col = \"gray30\",\n"," weeknames.size = 4.5,\n"," months.size = 10,\n"," months.col = \"gray30\",\n"," months.pos = 0.5,\n"," mbg.col = \"white\",\n"," legend.pos = \"none\",\n"," legend.title = \"\",\n"," bg.col = \"white\",\n"," bg.img = \"\",\n"," margin = 1,\n"," lunar = FALSE,\n"," lunar.col = \"gray60\",\n"," lunar.size = 7,\n"," pdf = FALSE,\n"," doc_name = \"\",\n"," papersize = \"A4\"\n"," )\n"," \n","_\bA_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs:\n","\n"," year: Calendar year. By default uses the current year.\n","\n"," month: Month of the year or 'NULL' (default) for the yearly\n"," calendar.\n","\n","start_date: Custom start date of the calendar. If 'start_date != NULL',\n"," 'year' and 'month' arguments won't be taken into account.\n","\n","end_date: Custom end date of the calendar.\n","\n"," start: '\"S\"' (default) for starting the week on Sunday or '\"M\"' for\n"," starting the week on Monday.\n","\n","orientation: The calendar orientation: '\"portrait\"' or '\"landscape\"'\n"," (default). Also accepts '\"p\"' and '\"l\"'.\n","\n"," title: Title of the the calendar. If not supplied is the year and\n"," the month, or the year if 'month = NULL'.\n","\n","title.size: Size of the main title.\n","\n","title.col: Color of the main title.\n","\n","subtitle: Subtitle of the calendar in italics (optional).\n","\n","subtitle.size: Font size of the subtitle.\n","\n","subtitle.col: Color of the subtitle.\n","\n"," text: Character vector of texts to be added on the calendar. Only\n"," for monthly calendars.\n","\n","text.pos: Numeric vector containing the number of days of the month\n"," where to add the texts of the 'text' argument.\n","\n","text.size: Font size of the texts added with the 'text' argument.\n","\n","text.col: Color of the texts added with the 'text' argument.\n","\n","special.days: Numeric vector indicating the days to color or\n"," '\"weekend\"' for coloring all the weekends.\n","\n","special.col: Color for the days indicated in special.days. If 'gradient\n"," = TRUE', is the higher color of the gradient.\n","\n","gradient: Boolean. If 'special.days' is a numeric vector of the length\n"," of the displayed days, 'gradient = TRUE' creates a gradient\n"," of the 'special.col' on the calendar.\n","\n"," low.col: If 'gradient = TRUE', is the lower color of the gradient. If\n"," 'gradient = FALSE' is the background color of the days.\n"," Defaults to '\"white\"'.\n","\n"," col: Color of the lines of the calendar.\n","\n"," lwd: Line width of the calendar.\n","\n"," lty: Line type of the calendar. If 'lty = 0' no lines are drawn.\n","\n","font.family: Font family of all the texts.\n","\n","font.style: Style of all the texts and numbers except the subtitle.\n"," Possible options are '\"plain\"' (default), '\"bold\"',\n"," '\"italic\"' and '\"bold.italic\"'.\n","\n","day.size: Font size of the number of the days.\n","\n","days.col: Color of the number of the days.\n","\n","weeknames: Character vector with the names of the days of the week\n"," starting on Monday. By default they will be in the system\n"," locale.\n","\n","weeknames.col: Color of the names of the days.\n","\n","weeknames.size: Size of the names of the days.\n","\n","months.size: Font size of the names of the months.\n","\n","months.col: If 'month = NULL', is the color of the month names.\n","\n","months.pos: Horizontal align of the month names. Defaults to 0.5\n"," (center).\n","\n"," mbg.col: Background color of the month names. Defaults to \"white\".\n","\n","legend.pos: If 'gradient = TRUE', is the position of the legend. It can\n"," be set to '\"none\"' (default), '\"top\"', '\"bottom\"', '\"left\"'\n"," and '\"right\"'.\n","\n","legend.title: If 'legend.pos != \"none\"' and 'gradient = TRUE', is the\n"," title of the legend.\n","\n"," bg.col: Background color of the calendar. Defaults to \"white\".\n","\n"," bg.img: Character string containing the URL or the local directory of\n"," a image to be used as background.\n","\n"," margin: Numeric. Allows controlling the margin of the calendar.\n","\n"," lunar: Boolean. If 'TRUE', draws the lunar phases. Only available\n"," for monthly calendars.\n","\n","lunar.col: If 'lunar = TRUE', is the color of the hide part of the\n"," moons.\n","\n","lunar.size: If 'lunar = TRUE', is the size of the representation of the\n"," moons.\n","\n"," pdf: Boolean. If 'TRUE', saves the calendar in the working\n"," directory in A4 format.\n","\n","doc_name: If 'pdf = TRUE', is the name of the generated file (without\n"," the file extension). If not specified, creates files of the\n"," format: 'Calendar_year.pdf' for yearly calendars and\n"," 'Calendar_month_year.pdf' for monthly calendars.\n","\n","papersize: PDF paper size. Possible options are '\"A6\"', '\"A5\"', '\"A4\"'\n"," (default), '\"A3\"', '\"A2\"', '\"A1\"' and '\"A0\"'. Depending on\n"," the size you will need to fine-tune some arguments, like the\n"," font sizes.\n","\n","_\bA_\bu_\bt_\bh_\bo_\br(_\bs):\n","\n"," • Soage González, José Carlos.\n","\n"," • Maintainer: José Carlos Soage González. \n","\n","_\bE_\bx_\ba_\bm_\bp_\bl_\be_\bs:\n","\n"," # Calendar of the current year\n"," calendR()\n"," \n"," # Calendar of July, 2005, starting on Monday\n"," calendR(year = 2005, month = 7, start = \"M\", subtitle = \"Have a nice day\")\n"," \n"," \n"," # Create ready to print monthly calendars for all the months of the current year\n"," # with week starting on Sunday\n"," invisible(sapply(1:12 , function(i) calendR(month = i, pdf = TRUE,\n"," doc_name = file.path(tempdir(), paste0(\"myCalendar\", i , \".pdf\")))))\n"," "]}],"source":["library(\"calendR\")\n","?calendR"]}],"metadata":{"kernelspec":{"display_name":"R","language":"R","name":"python388jvsc74a57bd0485035c5b2a6f2b50dc2dc5ca51aeeb931032fbc9adc2e30c7c528d6bf8a9176"},"language_info":{"codemirror_mode":"r","file_extension":".r","mimetype":"text/x-r-source","name":"R","pygments_lexer":"r","version":"3.6.1"}},"nbformat":4,"nbformat_minor":2}