ProjectTemplate (version 0.4-2)

cache: Cache a data set for faster loading.

Description

This function will store a copy of the named data set in the cache directory. This cached copy of the data set will then be given precedence at load time when calling load.project. Cached data sets are stored as .RData files.

Usage

cache(variable)

Arguments

variable
A character vector containing the name of the variable to be saved.

Value

  • No value is returned; this function is called for its side effects.

Examples

Run this code
library('ProjectTemplate')
create.project('tmp-project')

setwd('tmp-project')

dataset1 <- 1:5
cache('dataset1')

setwd('..')
unlink('tmp-project')

Run the code above in your browser using DataLab