A template utility for R projects that provides a skeletal project.
R CSS HTML Makefile Other
Latest commit fb2b9e9 Sep 19, 2016 @connectedblue connectedblue committed with KentonWhite Some updates to caching and config (#152)
* Added clear.cache function

* Updated DESCRIPTION with clear.cache in Collate field

* Processed documentation in roxygen

* Try to fix documentation error issues

* Added a modification to the cache function

* modified load.project to read in a custom config file for the project if it exists

* Created README to document changes

* Update readme changes

* Moved global config reader out of load.project and into a new function create.config.  Added a new lib file called globals.R containing a skeleton function call to create.config

* Added an is.cached helper function

* changed create.config to add.config (more natural)

* added clearer user messaging at the end of the function to show which objects were removed and which were unable to be removed

* Updated documentation for add.config and renamed globals.R skeleton

* force globals.R in lib to be read first during load.project

* Updated website documentation for global config.  Also updated README in the lib directory

* remove any of the changes to do with caching (they are saved into the fastcache branch)

* removed a private README file


ProjectTemplate Travis-CI build status

The ProjectTemplate package lets you automatically build a directory for a new R project with a standardized subdirectory structure. Using this structure, ProjectTemplate automates data and package loading. The hope is that standardized data loading, automatic importing of best practice packages, integrated unit testing and useful nudges towards keeping a cleanly organized codebase will improve the quality of R coding.

The inspiration comes from the rails command from Ruby on Rails, which initializes a new Rails project with the proper skeletal structure automatically. Also, ProjectTemplate follows Rails's approach of preferring convention over configuration: the automatic data and library loading as well as the automatic testing work easily because assumptions are made about the directory structure and naming conventions used in your code. You can customize your codebase however you'd like, but you will have to edit the ProjectTemplate loading functions to use your conventions instead of the defaults.


ProjectTemplate is now available on CRAN and can be installed using a simple call to install.packages():


If you would like access to changes to this package that are not available in the version currently on CRAN, please install this package directly from Github,

    install_github('ProjectTemplate', username = 'johnmyleswhite')

For most users, running the bleeding edge version of this package is probably a mistake.

Example Code

To create a project called my-project, open R and type:


Finding Out More