This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://twitter.com/yutannihilat_en/status/1287402204987396096 | |
# reference: https://ggplot2.tidyverse.org/reference/scale_colour_discrete.html | |
library(ggplot2) | |
# functions to define scaling options ---------------- | |
scale_fill_statZH <- function() { | |
ggplot2::scale_fill_manual(values = statR::zhpal$zhdiagonal) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sample data | |
tib <- tibble( | |
source = rep("ABC", 5), | |
year = seq(2016, 2020, 1) | |
) | |
# preprare list | |
tib_lst <- lst( | |
YEM = dat, | |
ZMB = dat, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("numform") | |
seq_in <- seq(1:20) | |
numform::f_pad_zero(x = seq_in, width = 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("cffr") | |
library(cffr) | |
packageVersion("cffr") | |
# Hard code doi | |
doi <- "10.5281/zenodo.6470427" | |
# creates CFF with all author roles | |
mod_cff <- cff_create("DESCRIPTION", |