installLocalPackageIfChanged | R Documentation |
Reinstalls a local R package if it is not already installed or if files in the package directory have changed since the last snapshot. Useful for automating package installation during development.
installLocalPackageIfChanged(pkg_path, snapshot_path)
pkg_path |
Character string. Path to the local R package directory. |
snapshot_path |
Character string. Path to the snapshot file used for change detection. |
The function checks whether the specified package is installed and whether any files in the directory have changed. If needed, the package is reinstalled and the snapshot is updated.
Invisibly returns NULL
. Installs the package and updates the snapshot if needed.
installLocalPackage
, saveRDS
## Not run:
installLocalPackageIfChanged(
pkg_path = "./Rpackage/IMPACTncd_Engl_model_pkg/",
snapshot_path = "./Rpackage/.IMPACTncd_Engl_model_pkg_snapshot.rds"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.