data_version | R Documentation |
Retrieves the DataVersion of a package if available
data_version(pkg, lib.loc = NULL)
dataVersion(pkg, lib.loc = NULL)
pkg |
|
lib.loc |
|
Object of class 'package_version' and 'numeric_version' specifying the DataVersion of the package
dataVersion()
has been renamed to data_version()
packageVersion
if(rmarkdown::pandoc_available()){
f <- tempdir()
f <- file.path(f,"foo.Rmd")
con <- file(f)
writeLines("```{r}\n vec = 1:10 \n```\n",con=con)
close(con)
pname <- basename(tempfile())
datapackage_skeleton(name = pname,
path=tempdir(),
force = TRUE,
r_object_names = "vec",
code_files = f)
package_build(file.path(tempdir(),pname), install = FALSE)
devtools::load_all(file.path(tempdir(),pname))
data_version(pname)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.