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