repo_open {repo} | R Documentation |
Open an existing repository or create a new one.
Description
If a repository does not exist at the specified location, creates a
directory and stores the repository index in it. If a repository
exists, the index is loaded and a repo
object is built.
Arguments
root |
Path to store data in. Defaults to "~/.R_repo". |
force |
Don't ask for confirmation. |
Value
An object of class repo
.
Examples
## Creates a new repository in a temporary directory without asking for
## confirmation.
rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)
rp$put(0, "zero", "a random item", "a_tag")
rp$info()
## wiping temporary repo
unlink(rp_path, TRUE)
[Package repo version 2.1.5 Index]