Learn R Programming

ProjectTemplate (version 0.11.1)

Automates the Creation of New Statistical Analysis Projects

Description

Provides functions to automatically build a directory structure for a new R project. Using this structure, 'ProjectTemplate' automates data loading, preprocessing, library importing and unit testing.

Copy Link

Version

Install

install.packages('ProjectTemplate')

Monthly Downloads

712

Version

0.11.1

License

GPL-3 | file LICENSE

Maintainer

Kenton White

Last Published

August 30th, 2025

Functions in ProjectTemplate (0.11.1)

.create.cache.hash

Create a data.frame with the cache metadata
.evaluate.code

Run code and assign the results to variable
.init.logger

Initialize the logger for the project
.rstudioprojectfile

Return an RStudio project file as character vector
.stopifnotproject

Raise an error if given path is not a valid project
.attach.or.add.namespace

Attach a package or add a namespace
.is.cache.empty

Check whether the cache is empty
.load.data

Load the data from the cache and data directories
.is.ProjectTemplate

Test whether a given path is a ProjectTemplate project
.cache.filename

Construct the file names for the cache and hash
.load.helpers

Load the helper functions
.write.cache

Write a variable and its metadata to cache
.var.diff.from

Compare sets of variable names
migrate.template

Migrate a template to a new version of ProjectTemplate
.read.cache.info

Read metadata for a variable in the cache
.list.data

Build the list of data available for loading into memory
.list.files.and.dirs

List all files and directories, excluding .. and .
.quietstop

Stop silently
preinstalled.readers

Automatically read data into memory
.is.cached

Check whether variables are cached
.cached.variables

List all cached variables
.cache.status

Print the current cache status
.is.dir

Check if path is an existing directory
.stopifproject

Raise an error if given path is a valid project
.create.project.existing

Create a project structure
.load.libraries

Load the libraries listed in the configuration into memory
migrate.project

Migrates a project from a previous version of ProjectTemplate
.get.template

Get the location of a template from its name
.munge.data

Source all munge scripts
.remove.sticky.vars

Remove variables to keep from a list of candidates for removal
loadproject_addin

Load Project
translate.dcf

Read a DCF file into an R list.
.package.version

Get the current ProjectTemplate version
.parse.extensions

Match readers to the extensions of the data files
.prepare.data.ignore.regex

Prepare a regular expression for matching files to be ignored
require.package

Require a package for use in the project
.provide.directory

Make sure a required directory exists before usage
reloadproject_addin

Reload Project
load.project

Automatically load data and packages for a project.
list.data

Listing the data for the current project
stub.tests

Generate unit tests for your helper functions.
run.project

Run all of the analyses in the src directory.
.dir.empty

Check if a directory is empty
show.project

Show information about the current project.
test.project

Run all unit tests for this project.
project.config

ProjectTemplate Configuration file
.require.package

Require internal package
.unload.project

Unload the project variables keeping the data
reload.project

Reload or reset a project
ProjectTemplate-package

ProjectTemplate: Automates the Creation of New Statistical Analysis Projects
add.config

Add project specific config to the global config
cache.project

Cache a project's data sets in binary format.
clear.cache

Clear data sets from the cache
cache

Cache a data set for faster loading.
.add.extension

Associate a reader function with an extension.
create.project

Create a new project.
clear

Clear objects from the global environment
create.template

Create a new template
get.project

Show information about the current project.
.cache.hash

Calculate the hash of the data stored in a variable
cache.name

Translate a variable name into a file name for caching.
.cache.format

Get configured cache file format strategy
clean.variable.name

Translate a file name into a valid R variable name.
.convert.to.tibble

Convert one or more data sets to tibbles
.check.version

Compare the project version with the current ProjectTemplate version
.convert.to.data.table

Convert one or more data sets to data.tables
.has.project

Check if the project was loaded