repo_stash: Quickly store temporary data

Description Usage Arguments Details Value See Also Examples

View source: R/repo_public.R

Description

A very simplified call to put that only requires to specify a variable name.

Usage

1
repo_stash(object, rename = deparse(substitute(object)))

Arguments

object

The object to store in the repo.

rename

An optional character containing the new name for the item. Otherwise the name of object is used as item's name.

Details

The name parameter is used to search the parent (or a different specified) environment for the actual object to store. Then it is also used as the item name. The reserved tags "stash" and "hide" are set. In case a stashed item by the same name already exists, it is automatically overwritten. In case a non-stashed item by the same name already exists, an error is raised. A different name can be specified through the rename parameter in such cases.

Value

Used for side effects.

See Also

repo_put, repo_lazydo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)
tempdata <- runif(10)
rp$stash(tempdata)
rp$info("tempdata")

## wiping temporary repo
unlink(rp_path, TRUE)

## End(Not run)

repo documentation built on March 26, 2020, 8:25 p.m.