upgrade_data {git2rdata} | R Documentation |
Upgrade Files to the New Version
Description
Updates the data written by older versions to the current data format
standard. Works both on a single file and (recursively) on a path. The
".yml"
file must contain a "..generic"
element. upgrade_data()
ignores
all other files.
Usage
upgrade_data(file, root = ".", verbose, ..., path)
## S3 method for class 'git_repository'
upgrade_data(
file,
root = ".",
verbose = TRUE,
...,
path,
stage = FALSE,
force = FALSE
)
Arguments
file |
the name of the git2rdata object. Git2rdata objects cannot
have dots in their name. The name may include a relative path. |
root |
The root of a project. Can be a file path or a |
verbose |
display a message with the update status. Defaults to |
... |
parameters used in some methods |
path |
specify |
stage |
Logical value indicating whether to stage the changes after
writing the data. Defaults to |
force |
Add ignored files. Default is FALSE. |
Value
the git2rdata object names.
See Also
Other internal:
is_git2rdata()
,
is_git2rmeta()
,
meta()
Examples
# create a directory
root <- tempfile("git2rdata-")
dir.create(root)
# write dataframes to the root
write_vc(iris[1:6, ], file = "iris", root = root, sorting = "Sepal.Length")
write_vc(iris[5:10, ], file = "subdir/iris", root = root,
sorting = "Sepal.Length")
# upgrade a single git2rdata object
upgrade_data(file = "iris", root = root)
# use path = "." to upgrade all git2rdata objects under root
upgrade_data(path = ".", root = root)