Skip to content

Instantly share code, notes, and snippets.

@darokun
Last active December 1, 2020 14:57
Show Gist options
  • Save darokun/44890d66f0faa88b9dee3ad23dc6a505 to your computer and use it in GitHub Desktop.
Save darokun/44890d66f0faa88b9dee3ad23dc6a505 to your computer and use it in GitHub Desktop.
Create 2020 and 2021 calendars to keep track of daily activities by crossing out days
pacman::p_load(tidyverse, suncalc, ggimage, lubridate)
src_calendR <- "https://raw.githubusercontent.com/R-CoderDotCom/calendR/master/R/calendR.R"
download.file(src_calendR, "calendR.R")
source("calendR.R") # installing package doesn't work in my system (old R version), sourcing instead.
days_until_20201130 <- seq(ymd("20200101"), ymd("20201130"), "days")
### habits to track
# arms
calendR(orientation = "landscape", pdf = TRUE, doc_name = "arms_cal2020", special.days = 1:length(days_until_20201130), special.col = "black", low.col = "white", title = "arms 2020")
calendR(year = 2021, orientation = "landscape", pdf = TRUE, doc_name = "arms_cal2021", title = "arms 2021")
# meds
calendR(orientation = "landscape", pdf = TRUE, doc_name = "meds_cal2020", special.days = 1:length(days_until_20201130), special.col = "black", low.col = "white", title = "meds 2020")
calendR(year = 2021, orientation = "landscape", pdf = TRUE, doc_name = "meds_cal2021", title = "meds 2021")
# one paper a day
calendR(orientation = "landscape", pdf = TRUE, doc_name = "paper_cal2020", special.days = 1:length(days_until_20201130), special.col = "black", low.col = "white", title = "2020", subtitle = "One paper a day")
# calendR(year = 2021, orientation = "landscape", pdf = TRUE, doc_name = "arms_cal2021", title = "arms 2021")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment