Use insertStructure() to set up a new OMOP study package
with common folders, starter scripts, tests, and package
dependencies.
Create the study package
Choose a new, empty directory and supply it explicitly. The example
uses a temporary directory so it does not write to the current working
directory or a home directory. Make sure you have internet access
because the setup installs the standard study-package dependencies.
n_obj sets the number of objective scripts to create.
study_path <- file.path(tempdir(), "P1-C1-001")
dir.create(study_path)
studyGenerics::insertStructure(
studyName = "P1-C1-001",
path = study_path,
n_obj = 3
)The package will include:
studyPackage/
├── R/
│ ├── createCohorts.R
│ ├── runStudy.R
│ ├── runDiagnostics.R
│ ├── utils.R
│ ├── globals.R
│ ├── merge.R
│ └── objective1.R, ..., objective<n_obj>.R
├── inst/
│ ├── cohorts/
│ └── concept_sets/
├── extras/
│ ├── CodeToRun.R
│ └── pullConceptSetsFromAtlas.R
├── man/
├── tests/
│ └── testthat/test-*.R
├── LICENSE.md
├── NEWS.md
└── README.Rmd