ProjectTemplate is based on the idea that you should structure all of your data analysis projects in the same way so that you can exploit conventions instead of writing boilerplate code. Because so much of ProjectTemplate’s functionality is based on conventions, it’s worth explaining ProjectTemplate’s idealized project in some detail.

That being said, at some point you might find yourself recreating a number of directories and files for every project. For example you might work with spatial data and want a directory called geodata, or you have custom packages you want to add to the global.dcf. As long as you stick to the minimal project layout explained below any directory can serve as your project template. The process of creating and maintaining custom templates is described on the page Custom templates.

Full Project Layout

By default ProjectTemplate creates a directory structure containing everything a good statistical analysis should contain, as far as ProjectTemplate is concerned. As you’ll see later a number of these directories are mandatory for ProjectTemplate to function properly. The following listing shows the project structure created by default:

Each of these directories and files serves a specific purpose, which we describe below, as well as in a file within each directory:

Minimal Project Layout

Besides the full project layout, created by default, it is also possible to create a minimal project structure that only contains the mandatory directories and files. This can be created using create.project(template='minimal'), and results in the following structure:

This is designed for newcomers who don’t need the more advanced subdirectories that ProjectTemplate normally creates. It is also the default structure for a new template.