Skip to contents

Create a Pre-defined Directory Hierarchy on Disk

Usage

create_directory_structure(
  path,
  structure_path = system.file("templates", "_project_structure_en.yaml", package =
    "saros.base"),
  numbering_prefix = c("none", "max_local", "max_global"),
  numbering_inheritance = TRUE,
  word_separator = NULL,
  numbering_parent_child_separator = word_separator,
  numbering_name_separator = " ",
  case = c("asis", "sentence", "title", "lower", "upper", "snake"),
  replacement_list = c(project_initials = "SSN"),
  create = FALSE,
  count_existing_folders = FALSE
)

Arguments

path

String, path to where to create the project files

structure_path

String. Path to the YAML file that defines the folder structure. Defaults to system.file("templates", "_project_structure_en.yaml").

numbering_prefix

String. One of c("none", "max_local", "max_global").

numbering_inheritance

Flag. Whether to inherit numbering from parent folder.

word_separator

String. Replace separators between words in folder names. Defaults to NULL.

numbering_parent_child_separator

String. Defaults to word_separator.

numbering_name_separator

String. Separator between numbering part and name.

case

String. One of c("asis", "sentence", "lower", "upper", "title", "snake").

replacement_list

named character vector. Each name in this vector will be replaced with its "{{value}}" in the structure_path file

create

Boolean. Defaults to TRUE in initialize_saros_project(), FALSE in create_directory_structure().

count_existing_folders

Boolean. Defaults to FALSE.

Value

No return value, called for side effects

Examples

create_directory_structure(path = tempdir())
#> /tmp/Rtmp2lQrcN/Administration
#> /tmp/Rtmp2lQrcN/Administration/Application
#> /tmp/Rtmp2lQrcN/Administration/Application/Call
#> /tmp/Rtmp2lQrcN/Administration/Application/Formalities
#> /tmp/Rtmp2lQrcN/Administration/Application/CVs
#> /tmp/Rtmp2lQrcN/Administration/Application/Collaboration and cooperation
#> agreements
#> /tmp/Rtmp2lQrcN/Administration/Application/Application
#> /tmp/Rtmp2lQrcN/Administration/Application/Pre-analysis
#> /tmp/Rtmp2lQrcN/Administration/Application/For submission
#> /tmp/Rtmp2lQrcN/Administration/Budget
#> /tmp/Rtmp2lQrcN/Administration/Contracts and agreements
#> /tmp/Rtmp2lQrcN/Administration/Invoices, accounting and receipts
#> /tmp/Rtmp2lQrcN/Administration/Status reports
#> /tmp/Rtmp2lQrcN/Administration/Logo and graphical materials
#> /tmp/Rtmp2lQrcN/Administration/Internal meetings
#> /tmp/Rtmp2lQrcN/Administration/Internal meetings/Meeting agendas and
#> invitations
#> /tmp/Rtmp2lQrcN/Administration/Internal meetings/Internal presentations
#> /tmp/Rtmp2lQrcN/Administration/Internal meetings/Minutes
#> /tmp/Rtmp2lQrcN/Materials
#> /tmp/Rtmp2lQrcN/Materials/Overall planning
#> /tmp/Rtmp2lQrcN/Materials/Consent form
#> /tmp/Rtmp2lQrcN/Materials/Ethical-GDPR approval
#> /tmp/Rtmp2lQrcN/Materials/Survey questionnaires
#> /tmp/Rtmp2lQrcN/Materials/Interview guides
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Staff
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Pupils
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Parents
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Researchers
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Leaders
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Teachers
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Principals
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Students
#> /tmp/Rtmp2lQrcN/Materials/Interview guides/Population
#> /tmp/Rtmp2lQrcN/Materials/Request of data from
#> /tmp/Rtmp2lQrcN/Materials/Literature review-design
#> /tmp/Rtmp2lQrcN/Materials/Intervention materials
#> /tmp/Rtmp2lQrcN/Materials/Randomizing participants
#> /tmp/Rtmp2lQrcN/Materials/Chapter overviews
#> /tmp/Rtmp2lQrcN/Literature
#> /tmp/Rtmp2lQrcN/Literature/Topic has policy relevance
#> /tmp/Rtmp2lQrcN/Literature/Pure theory and framework
#> /tmp/Rtmp2lQrcN/Literature/Similar empirical studies
#> /tmp/Rtmp2lQrcN/Literature/Similar instruments and guides for data collection
#> /tmp/Rtmp2lQrcN/Literature/Relevant analytic methodology
#> /tmp/Rtmp2lQrcN/Literature/Unprocessed (remove from here)
#> /tmp/Rtmp2lQrcN/Data
#> /tmp/Rtmp2lQrcN/Data/Population data
#> /tmp/Rtmp2lQrcN/Data/Population data/Codebook
#> /tmp/Rtmp2lQrcN/Data/Sampling frame
#> /tmp/Rtmp2lQrcN/Data/Registry data
#> /tmp/Rtmp2lQrcN/Data/Collected respondent lists
#> /tmp/Rtmp2lQrcN/Data/Respondent list for survey system
#> /tmp/Rtmp2lQrcN/Data/Downloaded response data
#> /tmp/Rtmp2lQrcN/Data/Downloaded response data/Codebook
#> /tmp/Rtmp2lQrcN/Data/Qualitative data
#> /tmp/Rtmp2lQrcN/Data/Qualitative data/Interview recordings
#> /tmp/Rtmp2lQrcN/Data/Qualitative data/Observational notes
#> /tmp/Rtmp2lQrcN/Data/Text corpus
#> /tmp/Rtmp2lQrcN/Data/PDF-reports
#> /tmp/Rtmp2lQrcN/Data/Prepared data
#> /tmp/Rtmp2lQrcN/Data/Prepared data/Codebooks
#> /tmp/Rtmp2lQrcN/Saros_SSN
#> /tmp/Rtmp2lQrcN/Saros_SSN/Scripts
#> /tmp/Rtmp2lQrcN/Saros_SSN/Resources
#> /tmp/Rtmp2lQrcN/Saros_SSN/Draft generations
#> /tmp/Rtmp2lQrcN/Saros_SSN/Draft generations/main
#> /tmp/Rtmp2lQrcN/Saros_SSN/Draft generations/Reports
#> /tmp/Rtmp2lQrcN/Saros_SSN/Drafts in editing
#> /tmp/Rtmp2lQrcN/Saros_SSN/Drafts in editing/main
#> /tmp/Rtmp2lQrcN/Saros_SSN/Drafts in editing/Reports
#> /tmp/Rtmp2lQrcN/Saros_SSN/Completed drafts
#> /tmp/Rtmp2lQrcN/Saros_SSN/Completed drafts/main
#> /tmp/Rtmp2lQrcN/Saros_SSN/Completed drafts/Reports
#> /tmp/Rtmp2lQrcN/Publications
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Cover letter
#> & response to reviewers
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Manuscript
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Analysis
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Figures for
#> submission
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Tables for
#> submission
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Appendix
#> /tmp/Rtmp2lQrcN/Publications/Paper1-Short title (author initials)/Online
#> supplementary materials
#> /tmp/Rtmp2lQrcN/Outreach
#> /tmp/Rtmp2lQrcN/Outreach/Research conference presentation
#> /tmp/Rtmp2lQrcN/Outreach/Research conference poster
#> /tmp/Rtmp2lQrcN/Outreach/Stakeholders and reference group
#> /tmp/Rtmp2lQrcN/Outreach/Stakeholders' communication channels
#> /tmp/Rtmp2lQrcN/Outreach/Practitioners and special interest channels
#> /tmp/Rtmp2lQrcN/Outreach/Public through mass media channels
#> /tmp/Rtmp2lQrcN/Other