scry | R Documentation |
Creates the standard directory structure required for the wizaRdry package to function properly. This includes folders for data cleaning scripts, NDA submission templates, and temporary outputs. It can detect and repair incomplete directory structures, and optionally create an R project.
scry(
study_alias = NULL,
path = ".",
overwrite = FALSE,
repair = FALSE,
show_tree = NULL,
create_project = FALSE,
examples = FALSE,
skip_prompt = FALSE
)
study_alias |
Character string specifying the short name for the study e.g. impact, capr, sing |
path |
Character string specifying the directory path where the structure should be created. Defaults to the current working directory. |
overwrite |
Logical. If TRUE, will overwrite existing files. If FALSE (default), will not replace existing files. |
repair |
Logical. If TRUE, will attempt to repair an incomplete directory structure. If FALSE, will abort with an error message when encountering an incomplete structure. |
show_tree |
Logical. If TRUE (default on first run), will display a visual file tree. Set to FALSE to suppress the tree view. |
create_project |
Logical. If TRUE, will create an R project file if one doesn't exist. If FALSE (default), will not create an R project. |
examples |
Logical. If TRUE (default when not repairing), will create example script templates. If FALSE (default when repairing), will skip creating example scripts. |
skip_prompt |
Logical. If TRUE, will skip the initial confirmation prompt. Defaults to FALSE. |
The function creates the following directory structure:
clean/
mongo/
qualtrics/
redcap/
nda/
mongo/
qualtrics/
redcap/
tmp/
It also creates template config.yml and secrets.R files, and optionally an R project file.
Invisible TRUE if successful.
## Not run:
# Initialize in current directory
scry()
# Repair structure in current directory
scry(repair = TRUE)
# Initialize in a specific directory with an R project
scry("path/to/project", create_project = TRUE, repair = TRUE)
# Skip the tree display
scry(repair = TRUE, show_tree = FALSE)
# Explicitly create example scripts when repairing
scry(repair = TRUE, examples = TRUE)
# Skip the confirmation prompt
scry(skip_prompt = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.