Add Remotes field to DESCRIPTION based on your local installation
Source:R/set_remotes.R
set_remotes_to_desc.Rd
Add Remotes field to DESCRIPTION based on your local installation
Arguments
- path.d
path to description file.
- stop.local
Logical. Whether to stop if package was installed from local source. Message otherwise.
- clean
Logical. Whether to clean all existing remotes before run.
Examples
tmpdir <- tempfile(pattern = "setremotes")
dir.create(tmpdir)
file.copy(system.file("dummypackage", package = "attachment"), tmpdir,
recursive = TRUE)
#> [1] TRUE
dummypackage <- file.path(tmpdir, "dummypackage")
# Add remotes field if there are Remotes locally
att_amend_desc(dummypackage) %>%
set_remotes_to_desc()
#> Saving attachment parameters to yaml config file
#> Updating dummypackage documentation
#> ────────────────────────────────────────────────────────────────────────────────
#> Changes in roxygen2 7.0.0:
#> * `%` is now escaped automatically in Markdown mode.
#> Please carefully check .Rd files for changes
#> ────────────────────────────────────────────────────────────────────────────────
#> Setting `RoxygenNote` to "7.3.2"
#> Writing NAMESPACE
#> ℹ Loading dummypackage
#> Writing NAMESPACE
#> ℹ Loading dummypackage
#> Package(s) Rcpp is(are) in category 'LinkingTo'. Check your Description file to be sure it is really what you want.
#> [-] 1 package(s) removed: utils.
#> [+] 2 package(s) added: stats, glue.
#> There are no remote packages installed on your computer to add to description
#> NULL
# Clean temp files after this example
unlink(tmpdir, recursive = TRUE)
if (FALSE) {
# For your current package
att_amend_desc() %>%
set_remotes_to_desc()
}