brew_install() installs a formula or cask. For information about additional arguments, see brew_help("install").

brew_reinstall() uninstalls and then reinstalls a formula or cask using the same options it was originally installed with, plus any appended options specific to a formula.

brew_uninstall() uninstalls a formula or cask

brew_install(
  package,
  cask = FALSE,
  force = FALSE,
  only_dependencies = FALSE,
  keep_tmp = FALSE,
  ...
)

brew_install_formula(package, ...)

brew_install_cask(package, ...)

brew_reinstall(package, ...)

brew_uninstall(package, ...)

Arguments

package

Name of formula or cask

cask

If TRUE, package refers to a cask. If FALSE (default), package refers to a formula.

force

Do not check for previous installations (default: FALSE)

only_dependencies

Install only dependencies and not the formula itself (default: FALSE)

keep_tmp

Do not delete temporary files created during installation (default: FALSE)

...

Arguments passed on to brew_cmd

cmd

The command to run (e.g., install)

args

Additional arguments for the command

brew_cmd

Optional: Location of brew command.

echo

Whether to print output and error messages to the screen. Defaults to TRUE for interactive sessions.

Value

A logical value indicating whether or not the installation was a success

Examples

if (FALSE) {
# Install unixodbc
brew_install("unixodbc")
}
if (FALSE) {
# Install the Homebrew-compiled version of R
brew_install_formula("r")
}
if (FALSE) {
# Install RStudio cask
brew_install_cask("rstudio")
}
if (FALSE) {
# Reinstall unixodbc
brew_reinstall("unixodbc")
}
if (FALSE) {
# Uninstall unixodbc
brew_uninstall("unixodbc")
}