| pkg_info {pracpac} | R Documentation | 
Get information about the current package
Description
Returns information about the current package in a list which can be passed to other functions.
Usage
pkg_info(pkg_path = ".", ...)
Arguments
| pkg_path | Path to the package directory. Default is  | 
| ... | Arguments passed to rprojroot::find_package_root_file. | 
Value
A list of information about the package.
-  pkgroot: Root directory of the package.
-  pkgdeps: Package dependencies fromImportsin theDESCRIPTION.
-  descfile: File path to theDESCRIPTIONfile.
-  pkgname: Package name.
-  pkgver: Package version.
Examples
## 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)
# This will succeed if this is a package
pkg_info(pkg_path = file.path(tempdir(), "hellow"))
# This will fail if this is not a package location
pkg_info(pkg_path = tempdir())
## End(Not run)
[Package pracpac version 0.2.0 Index]