check_yq: Check the availability and version of the 'yq' tool.

View source: R/yq.R

check_yqR Documentation

Check the availability and version of the yq tool.

Description

Check the availability and version of the yq tool.

Usage

check_yq(
  yq_binary = getOption("scdrake_yq_binary"),
  repair_executable = TRUE,
  verbose = TRUE
)

Arguments

yq_binary

A character scalar: path to the yq tool's binary.

repair_executable

A logical scalar: if TRUE, make the binary executable.

verbose

A logical scalar: if TRUE, be verbose. The default value is obtained from getOption("scdrake_verbose").

Details

When R is run from the command line, the PATH environment variable is inherited from the current shell session. But when R is run within the RStudio Server, user's PATH is not used. To modify the environment in which R is run within your project, place .Renviron file to the root of your project, e.g.:

echo 'PATH=${PATH}:"/path/to/dir/with/yq"' >> .Renviron

Environment variables defined in .Renviron will be available in the R session run within the RStudio project.

Alternatively in R after scdrake package is loaded, you can set a path to the yq tool's binary with options(scdrake_yq_binary = "/path/to/yq/binary").

Value

TRUE if checks pass.


bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.