R/setup_codingclub_session.R
setup_codingclub_session.Rd
This function will populate the content of /src
and /data
directories for a specific coding club session, the date of which is passed
as a parameter. Directories are created if needed. Files are downloaded
if not already present.
The date of the coding-club session, in the "YYYYMMDD"
format. Default: actual date
Root directory where source and data subdirectories are
located. Default: ./
Relative path for R script(s). Default: src
Relative path for data files. Default: data
if (FALSE) {
library(inborutils)
# Download coding club files for session 2020-02-25
# R script(s) in `./src/20200225` and data files in `./data/20200225`
setup_codingclub_session("20200225")
# Specify the folders where you want to save R files and data files
# R files will be downloaded in `./source`
# Data files will be downloaded in `./dataframes`
setup_codingclub_session(
"20200225",
src_rel_path = "source",
data_rel_path = "dataframes"
)
# You can modify the root directory even if it should be normally not needed.
# For example you want to move the root to the parent directory, `../`
setup_codingclub_session("20200225",
root_dir = "../",
src_rel_path = "source",
data_rel_path = "dataframes"
)
}