Learn R Programming

attachment (version 0.4.5)

set_remotes_to_desc: Add Remotes field to DESCRIPTION based on your local installation

Description

Add Remotes field to DESCRIPTION based on your local installation

Usage

set_remotes_to_desc(path.d = "DESCRIPTION", stop.local = FALSE, clean = TRUE)

Value

Used for side effect. Adds Remotes field in DESCRIPTION file.

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

Run this code
tmpdir <- tempfile(pattern = "setremotes")
dir.create(tmpdir)
file.copy(system.file("dummypackage", package = "attachment"), tmpdir,
 recursive = TRUE)
dummypackage <- file.path(tmpdir, "dummypackage")
# Add remotes field if there are Remotes locally
att_amend_desc(dummypackage) %>%
  set_remotes_to_desc()

# Clean temp files after this example
unlink(tmpdir, recursive = TRUE)

if (FALSE) {
# For your current package
att_amend_desc() %>%
  set_remotes_to_desc()
}

Run the code above in your browser using DataLab