A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://workflowr.github.io/workflowr/reference/wflow_start.html below:

Start a new workflowr project — wflow_start • workflowr

wflow_start creates a directory with the essential files for a workflowr project. The default behavior is to add these files to a new directory, but it is also possible to populate an existing directory. By default, the working directory is changed to the workflowr project directory.

Details

This is recommended function to set up the file infrastructure for a workflowr project. If you are using RStudio, you can also create a new workflowr project as an "RStudio Project Template". Go to "File" -> "New Project..." then select "workflowr project" from the list of project types. In the future, you can return to your project by choosing menu option "Open Project..." and selecting the .Rproj file located at the root of the workflowr project directory. In RStudio, opening this file will change the working directory to the appropriate location, set the file navigator to the workflowr project directory, and configure the Git pane.

wflow_start populates the chosen directory with the following files:

|--- .gitignore
|--- .Rprofile
|--- _workflowr.yml
|--- analysis/
|   |--- about.Rmd
|   |--- index.Rmd
|   |--- license.Rmd
|   |--- _site.yml
|--- code/
|   |--- README.md
|--- data/
|   |--- README.md
|--- docs/
|--- <directory>.Rproj
|--- output/
|   |--- README.md
|--- README.md

The two required subdirectories are analysis/ and docs/. These directories should never be removed from the workflowr project.

analysis/ contains all the source R Markdown files that implement the analyses for your project. It contains a special R Markdown file, index.Rmd, that typically does not include R code, and is will be used to generate index.html, the homepage for the project website. Additionally, this directory contains the important configuration file _site.yml. The website theme, navigation bar, and other properties can be controlled through this file (for more details see the documentation on R Markdown websites). Do not delete index.Rmd or _site.yml.

docs/ will contain all the webpages generated from the R Markdown files in analysis/. Any figures generated by rendering the R Markdown files are also stored here. Each figure is saved according to the following convention: docs/figure/<Rmd-filename>/<chunk-name>-#.png, where # corresponds to which of the plots the chunk generated (one chunk can produce several plots).

_workflowr.yml is an additional configuration file used only by workflowr. It is used to apply the workflowr reproducibility checks consistently across all R Markdown files. The most important setting is knit_root_dir which determines the directory where the scripts in analysis/ are executed. The default is to run code from the project root (i.e., "."). To execute the code from analysis/, for example, change the setting to knit_root_dir: "analysis". See wflow_html for more details.

Another required file is the RStudio project file (ending in .Rproj). Do not delete this file even if you do not use RStudio; among other essential tasks, it is used to determine the project root directory.

The optional directories are data/, code/, and output/. These directories are suggestions for organizing your workflowr project and can be removed if you do not find them relevant to your project.

data/ should be used to store "raw" (unprocessed) data files.

code/ should be used to store additional code that might not be appropriate to include in R Markdown files (e.g., code to preprocess the data, long-running scripts, or functions that are used in multiple R Markdown files).

output/ should be used to store processed data files and other outputs generated from the code and analyses. For example, scripts in code/ that pre-process raw data files from data/ should save the processed data files in output/.

All these subdirectories except for docs/ include a README file summarizing the contents of the subdirectory, and can be modified as desired, for example, to document the files stored in each directory.

.Rprofile is an optional file in the root directory of the workflowr project containing R code that is executed whenever the .Rproj file is loaded in RStudio, or whenever R is started up inside the project root directory. This file includes the line of code library("workflowr") to ensure that the workflowr package is loaded.

Finally, .gitignore is an optional file that indicates to Git which files should be ignored—that is, files that are never committed to the repository. Some suggested files to ignore such as .Rhistory and .Rdata are listed here.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4