Create a New metawoRld Project
create_metawoRld.Rd
Initializes the directory structure, configuration file, and Git repository for a new metawoRld living review project.
Usage
create_metawoRld(
path,
project_name,
project_description,
schema = NULL,
git_init = TRUE,
...
)
Arguments
- path
Character string. The path where the new project directory should be created. The directory itself will be created and should not already exist.
- project_name
Character string. A short, descriptive name for the project.
- project_description
Character string. A longer description of the project's scope.
- schema
List. A list defining the structure for metadata and data files. If NULL (default), a standard default schema is used. See details.
- git_init
Logical. Initialize a Git repository in the project directory? Defaults to TRUE.
- ...
Additional key-value pairs to add to the root
_metawoRld.yml
file.
Details
The function creates the main project directory at path
and sets up the following:
_metawoRld.yml
: The main configuration file containing project metadata and the data schema.data/
: An empty directory to store study-specific subdirectories..git/
: Ifgit_init = TRUE
, initializes a Git repository..gitignore
: A standard R/.git/.quarto ignore file.README.md
: A basic README file.
The default schema defines expected fields for metadata.yml
and data.csv
files
within each study folder. You can provide a custom schema using the schema
argument.
Examples
if (FALSE) { # \dontrun{
# Create a project in a temporary directory
proj_path <- file.path(tempdir(), "my_cytokine_review")
create_metawoRld(
path = proj_path,
project_name = "Serum Cytokines in Pre-eclampsia",
project_description = "A living review of serum cytokine levels associated with PE.",
inclusion_criteria = c("Human studies", "Serum samples", "Preeclampsia outcome"),
search_keywords = list(mandatory = c("cytokine", "serum", "preeclampsia"),
optional = c("pregnancy", "biomarker"))
)
# List files in the new project
list.files(proj_path, recursive = TRUE)
# Clean up
unlink(proj_path, recursive = TRUE)
} # }