Skip to contents

This function will return the path to the wget executable if it can be found on the local system, and optionally install it if it is not found. Installation (if required) currently only works on Windows platforms. The wget.exe executable will be downloaded from https://eternallybored.org/misc/wget/ installed into your appdata directory (typically something like C:/Users/username/AppData/Roaming/)

Usage

bb_find_wget(install = FALSE, error = TRUE)

Arguments

install

logical: attempt to install the executable if it is not found? (Windows only)

error

logical: if wget is not found, raise an error. If FALSE, do not raise an error but return NULL

Value

the path to the wget executable, or (if error is FALSE) NULL if it was not found

References

https://eternallybored.org/misc/wget/

See also

Examples

if (FALSE) {
  wget_path <- bb_find_wget()
  wget_path <- bb_find_wget(install=TRUE) ## install (on windows) if needed
}