Create a clinical research project with a standardized structure:
├── main.R
├── NEWS.md
├── R
│ ├── init.R
│ ├── read.R
│ ├── check.R
│ ├── description.R
│ ├── graph.R
│ └── report.R
├── README.md
└── my_proj.Rproj
gr_new_project(path, open = TRUE, verbose = TRUE)
The path to the project, invisibly.
At the root of the project:
README.md
contains a short description of the project
NEWS.md
contains the descriptions of the versions of the project
main.R
is the central script that sequentially calls all the others
In the R folder:
init.R
loads all used packages and set options
read.R
reads the data and sets global variables
check.R
checks the data, e.g. using edc_data_warn()
description.R
describe the data, e.g. using crosstable::crosstable()
graph.R
create plots, and saves them on the disk or in the plots
global list
report.R
creat the report, e.g. using the officer
package
if (FALSE) { # \dontrun{
gr_new_project("projects/my_project_folder")
} # }