This function has side-effects by default, see the set_as_default argument.
Usage
download_yq(
url = NULL,
os = NULL,
arch = NULL,
yq_version = "3.4.1",
destfile = get_yq_default_path(),
set_as_default = TRUE,
do_check = TRUE,
ask = TRUE,
overwrite = FALSE,
dry = FALSE,
verbose = getOption("scdrake_verbose")
)Arguments
- url
A character scalar: URL from which binary will be downloaded. If
NULL, it will be created fromos,arch, andyq_version.- os
A character scalar: specifies the current OS (
"linux","windows", or"darwin"for macOS). IfNULL, it will be determined from.Platform$OS.type.- arch
A character scalar: specifies the current CPU architecture (
32,64, or"arm64"). IfNULL, it will be determined from.Machine$sizeof.pointer(4 -> 32,8 -> 64) or from R.version for"arm64"(which is identified as"aarch64"for Apple's M1 chipsets).- yq_version
A character scalar:
yqtool version.- destfile
A character scalar: destination file.
- set_as_default
A logical scalar: if
TRUE, setoptions(scdrake_yq_binary = destfile).- do_check
A logical scalar: if
TRUE, functionality of the downloaded (or present)yqbinary will be checked.- ask
A logical scalar: if
TRUE, ask beforeyqbinary is downloaded.- overwrite
A logical scalar: if
TRUE, overwrite the existingyqbinary if exists.- dry
A logical scalar: if
TRUE, do not download theyqbinary and just return its URL.- verbose
A logical scalar: if
TRUE, be verbose. The default value is obtained fromgetOption("scdrake_verbose").