is_git2rdata | R Documentation |
A valid git2rdata object has valid metadata.
is_git2rdata(file, root = ".", message = c("none", "warning", "error"))
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 |
message |
a single value indicating the type of messages on top of the
logical value. |
A logical value. TRUE
in case of a valid git2rdata object.
Otherwise FALSE
.
Other internal:
is_git2rmeta()
,
meta()
,
print.git2rdata()
,
summary.git2rdata()
,
upgrade_data()
# create a directory
root <- tempfile("git2rdata-")
dir.create(root)
# store a file
write_vc(iris[1:6, ], "iris", root, sorting = "Sepal.Length")
# check the stored file
is_git2rmeta("iris", root)
is_git2rdata("iris", root)
# Remove the metadata from the existing git2rdata object. Then it stops
# being a git2rdata object.
junk <- file.remove(file.path(root, "iris.yml"))
is_git2rmeta("iris", root)
is_git2rdata("iris", root)
# recreate the file and remove the data and keep the metadata. It stops being
# a git2rdata object, but the metadata remains valid.
write_vc(iris[1:6, ], "iris", root, sorting = "Sepal.Length")
junk <- file.remove(file.path(root, "iris.tsv"))
is_git2rmeta("iris", root)
is_git2rdata("iris", root)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.