repo_open {repo} | R Documentation |
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.
root |
Path to store data in. Defaults to "~/.R_repo". |
force |
Don't ask for confirmation. |
An object of class repo
.
## 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)