- data: locate data files (e.g. .csv)
- original: original R scripts written by each author
- revised: revised R scripts with reformatting and refactoring
- chapters: add quarto documents to render html files that contains R code results
- final: final version to be included in the book
R
: version 4.3.2- Packages
{renv}
: version 1.0.3- other packages: from Posit Public Package Manager's CRAN snapshot as of 2024-01-12. Set repository address to be https://packagemanager.posit.co/cran/2024-01-12 with the following R script:
renv::init(repos = "https://packagemanager.posit.co/cran/2024-01-12")
- Copy R script file from original to revised
- Run
styler::style_file()
with the file in revised folder. Use defaulttidyverse_style
. - Remove code that creates side-effect, including but not limited to followings:
setwd()
to set work directory; all paths will be relative path starting from project directory as a rootinstall.packages()
to install packages; we will assume that required packages have been installed
- Ensure that each R code does not miss any dependencies to include (e.g. file, library)
- If it is possible and makes sense, remove dependency on
{tidyverse}
.- If it makes sense to keep using
{tidyverse}
, minimize the use of{tidyverse}
and provide a specific comment per each use if possible.
- If it makes sense to keep using