cli: Install or check the command line interface scripts.

install_cliR Documentation

Install or check the command line interface scripts.

Description

The scripts (scdrake shell script and scdrake.R) are bundled with the scdrake package and their paths can be retrieved with:

system.file("scdrake", package = "scdrake", mustWork = TRUE)
system.file("scdrake.R", package = "scdrake", mustWork = TRUE)

check_cli() is checking the presence of the scdrake CLI script in the PATH environment variable, and whether the command ⁠$ scdrake -h⁠ finishes successfully.

Usage

install_cli(
  dir = NULL,
  type = c("user", "system"),
  ask = TRUE,
  verbose = TRUE,
  .dry = FALSE
)

check_cli(verbose = TRUE)

Arguments

dir

A character scalar: path to directory where scripts will be copied to. If NULL, the path will be determined based on type.

type

A character scalar:

  • For "user": install into the user's home directory under .local/bin

  • For "system": install into ⁠/usr/local/bin⁠

ask

A logical scalar: if TRUE, ask before copying.

verbose

A logical scalar: if TRUE, be verbose.

.dry

A logical scalar: if TRUE, don't copy the files and just return output paths.

Value

install_cli(): invisibly a character vector of length two: paths to installed files.

check_cli(): invisibly TRUE when the checks are successful, FALSE otherwise.


bioinfocz/scdrake documentation built on Jan. 29, 2024, 10:24 a.m.