history | R Documentation |
history()
uses your version control system to show prior versions of the
lockfile and revert()
allows you to restore one of them.
These functions are currently only implemented for projects that use git.
history(project = NULL)
revert(commit = "HEAD", ..., project = NULL)
project |
The project directory. If |
commit |
The commit associated with a prior version of the lockfile. |
... |
Optional arguments; currently unused. |
history()
returns a data.frame
summarizing the commits in which
renv.lock
has been changed. revert()
is usually called for its
side-effect but also invisibly returns the commit
used.
## Not run:
# get history of previous versions of renv.lock in VCS
db <- renv::history()
# choose an older commit
commit <- db$commit[5]
# revert to that version of the lockfile
renv::revert(commit = commit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.