Identifies system running and pulls the relevant tarball for the
current release of bbi from GitHub, and then installs it at .path (see
Details section for defaults). If used in an interactive session, will open
an installation menu confirming the installed version. This function will
print information about the installed version. This printing can be
suppressed by setting options(bbr.verbose = FALSE).
Arguments
- .path
path to install bbi to. See Details section for defaults, if nothing is passed. Note that this should be the path where you would like the bbi executable to be installed, not the path to the directory in which you want to install it. For example, you should pass
"/some/dir/bbi"and not"/some/dir".- .version
version of bbi to install. Must pass a character scalar corresponding to a tag found in
https://github.com/metrumresearchgroup/bbi/releases- .force
If
FALSE, the default, skips installation if requested version and local version are the same. IfTRUEforces installation if it will be the same version.- .quiet
Deprecated. Use
options("bbr.verbose")instead to control printing. Defaults toNULL, which reads!getOption("bbr.verbose"). IfTRUE, suppresses output printed to the console.
Details
If nothing is passed to the .path argument, use_bbi() will
attempt to find a valid path for installation. The following decision
waterfall is used:
First, check
getOption("bbr.bbi_exe_path"). If this is anything other than"bbi"(the default value) then attempt to install to that path.Second, check
Sys.which("bbi")which will look for abbiinstallation in the user's$PATH. If one is found, ask the user if they wish to overwrite it and, if they confirm, install to that path.Third, attempt to install to a "default location" and add this location to the user's
$PATH. IfSys.getenv("XDG_DATA_HOME")is found, install to{Sys.getenv("XDG_DATA_HOME")}/bbi/bbi(per XGD specification). Otherwise, install to OS dependent defaults:Linux:
{Sys.getenv("HOME")}/.local/share/bbi/bbiMac:
/usr/local/bin/bbiWindows:
{Sys.getenv("APPDATA")}\bbi\bbi
If none of these are successful, the user will be prompted to set
options("bbr.bbi_exe_path") and try again.
