View source: R/setup_codingclub_session.R
setup_codingclub_session | R Documentation |
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.
setup_codingclub_session(
session_date = format(Sys.Date(), "%Y%m%d"),
root_dir = ".",
src_rel_path = "src",
data_rel_path = "data"
)
session_date |
The date of the coding-club session, in the |
root_dir |
Root directory where source and data subdirectories are
located. Default: |
src_rel_path |
Relative path for R script(s). Default: |
data_rel_path |
Relative path for data files. Default: |
## Not run:
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"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.