A template utility for R projects that provides a skeletal project.
R Makefile
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R Unquiet Warnings when install packages. (#262) May 6, 2018
docs Remove Google Groups May 2, 2018
inst Add file types to dat readme (#268) Jun 29, 2018
man Document internal functions (#243) May 1, 2018
tests Minor fixes .rbuildignore and test message: (#260) May 5, 2018
.Rbuildignore Minor fixes .rbuildignore and test message: (#260) May 5, 2018
.gitattributes fix merge driver Apr 14, 2014
.gitignore Updated spss.reader warnings to be compliant with foreign 0.8-69 Aug 2, 2017
.travis.yml Fix Travis Errors Apr 20, 2018
CODE_OF_CONDUCT.md
DESCRIPTION Create LICENSE (#248) May 2, 2018
ISSUE_TEMPLATE.md Patch 1 (#219) Feb 25, 2018
LICENSE Create LICENSE (#248) May 2, 2018
Makefile remove unneeded / changed maintainer Aug 10, 2016
NAMESPACE Fixes bug with RStudio addins not importing package on click (#232) Apr 23, 2018
NEWS.md Release 0.8.2 to CRAN Apr 20, 2018
PULL_REQUEST_TEMPLATE.md Create PULL_REQUEST_TEMPLATE.md Apr 28, 2018
ProjectTemplate.Rproj Override globals.r (#222) Mar 5, 2018
README.markdown Changed install_github end point May 2, 2018
appveyor.yml use correct file Aug 8, 2014
build_script.R Revised devtools build script May 13, 2012
cran-comments.md update comments Jul 29, 2016

README.markdown

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.

Installing

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

install.packages('ProjectTemplate')

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,

	library('devtools')
	install_github('KentonWhite/ProjectTemplate')

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:

library('ProjectTemplate')
create.project('my-project')
setwd('my-project')
load.project()

Finding Out More