Learn R Programming

ProjectTemplate (version 0.3-5)

cache: Cache a data set for faster loading.

Description

Cache a data set for faster loading.

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.

Details

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.

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