initialize_study: initialize a study-level directory structure

View source: R/initialize_study.R

initialize_studyR Documentation

initialize a study-level directory structure

Description

Create directory structure for a new study in the DEPENd lab

Usage

initialize_study(
  name,
  loc,
  sessions = 1,
  data_modalities = list(),
  l1_dirs = "all",
  nda = TRUE,
  curation_repo = NULL
)

Arguments

name

Name of the study, this is the name of the newly created directory as well.

loc

Location to generate the newly created directory

sessions

Either a vector of session numbers or names: c(1,2,3,4,5) | c("clinical_interview", "internet_testing1", "internet_testing_2", etc) OR a single numeric value that designates the number of sessions to count up to. E.g. 5 will create data_collection folders for 1:5.

data_modalities

Named list of data modalities and different instances of those modalities being collected (see example)

l1_dirs

Defaults to "all" to include all level 1 directories, but can specify a subset of c("study_info", "subj_management", "data_collection", "data", "data_curation") if the destination folder only needs some of the l1 directories.

nda

Logical defaults to true. Whether or not to include an nda folder in the data folder

curation_repo

Defaults to empty (just creates empty folder). allows user to enter a vector of git repositories to clone

Value

path to newly created study directory

Author(s)

Nate Hall

Examples

 ## Not run: 
   setup_study(name = "neuromap",
               loc = "~/Desktop",
               sessions = 5,
               data_modalities = list(overview_forms = c("ses_ladder", "demogs", "contact_info", "payment_apps", "consent"),
                                      clinical_interview = c("scid", "sidp", "sis", "mini"),
                                      self_report = c("bfi", "upps"), # INCOMPLETE
                                      neuro_cog = "rist",
                                      behav_s3 = c("sorting_mushrooms", "kingdom", "vending_machine", "vanilla_baseline", "neighborhood"),
                                      eye_s3 = c("sorting_mushrooms", "kingdom", "vending_machine", "vanilla_baseline", "neighborhood"),
                                      physio_s3 = c("sorting_mushrooms", "kingdom", "vending_machine", "vanilla_baseline", "neighborhood"),
                                      mri = c()),
               l1_dirs = "all",
               nda = TRUE,
               curation_repo = c("git@sc.unc.edu:dependlab/nda_submission_neuromap.git",
                                 "git@sc.unc.edu:dependlab/s3_datareports.git",
                                 "git@sc.unc.edu:dependlab/s3_org.git",
                                 "git@sc.unc.edu:dependlab/s4_datareports.git"))

 
## End(Not run)


PennStateDEPENdLab/dependlab documentation built on June 15, 2024, 8:49 a.m.