build_pkg | R Documentation |
Builds a package source tar.gz using pkgbuild::build and moves it into a user-specified location (default docker/
).
build_pkg(pkg_path = ".", img_path = NULL, ...)
pkg_path |
Path to the package directory. Default is |
img_path |
Path to the write the docker image definition contents. The default |
... |
Additional optional arguments passed to pkgbuild::build. |
Invisibly returns a list of package info returned by pkg_info, tar.gz source and destination file paths.
## Not run:
# Specify path to example package source and copy to tempdir()
# Note that in practice you do not need to copy to a tempdir()
# And in fact it may be easiest to use pracpac relative to your package directory root
ex_pkg_src <- system.file("hellow", package = "pracpac", mustWork = TRUE)
file.copy(from = ex_pkg_src, to = tempdir(), recursive = TRUE)
# Build the example package from tempdir()
build_pkg(pkg = file.path(tempdir(), "hellow"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.