Download specified version of EnergyPlus for your platform from GitHub and install it.

install_eplus(ver = "latest", local = FALSE, dir = NULL,
force = FALSE, ...)

download_eplus(ver = "latest", dir)

## Arguments

ver The EnergyPlus version number, e.g., 8.7. The special value "latest", which is the default, means the latest version. Whether to install EnergyPlus only for current user. For Windows and Linux, if FALSE, administrative privileges are required to install EnergyPlus to the default system-level location. See details. local should be also set to FALSE if you do not have the write access to the directory specified via dir. Default: FALSE. For macOS, administrative privileges are always required no matter you want EnergyPlus to be install at /Applications or ~/Applications. For download_eplus(), where to save EnergyPlus installer file. Default: ".". For install_eplus(), the installer will always be saved into tempdir(). But you can use dir to specify the parent directory of EnergyPlus installation, i.e. the parent directory of EnergyPlusVX-Y-0 on Windows and EnergyPlus-X-Y-0 on Linux. macOS is not supported. If NULL, the default installation path will be used. See details for more information. Please note that dir does not work on macOS and EnergyPlus will always be installed into the default location. Default: NULL. Whether to install EnergyPlus even if it has already been installed. Other arguments to be passed to the installer. Current only one additional argument exists and is only for Linux: * dir_bin: A path where symbolic links will be created to the software executables. The default is /usr/local/bin if local is FALSE and ~/.local/bin if local is TRUE.

## Value

An invisible integer 0 if succeed. Moreover, some attributes will also be returned:

• For install_eplus():

• path: the EnergyPlus installation path

• installer: the path of downloaded EnergyPlus installer file

• For download_eplus():

• file: the path of downloaded EnergyPlus installer file

## Details

download_eplus() downloads specified version of EnergyPlus from EnergyPlus GitHub Repository.

install_eplus() will try to install EnergyPlus into the default location, e.g. C:\EnergyPlusVX-Y-0 on Windows, /usr/local/EnergyPlus-X-Y-0 on Linux, and /Applications/EnergyPlus-X-Y-0 on macOS.

Note that installing to the default location requires administrative privileges and you have to run R with administrator (or with sudo if you are on Linux) to make it work if you are not in interactive mode.

If you cann't run R with administrator, it is possible to install EnergyPlus to your home corresponding directory by setting local to TRUE.

The user level EnergyPlus installation path is:

• Windows:

• dir(Sys.getenv("LOCALAPPDATA"), "EnergyPlusVX-Y-0") OR

• C:\Users\<User>\AppData\Local\EnergyPlusVX-Y-0 if environment variable "LOCALAPPDATA" is not set

• macOS: /Users/<User>/Applications/EnergyPlus-X-Y-0

• Linux: "~/.local/EnergyPlus-X-Y-0"

On Windows and Linux, you can also specify your custom directory using the dir argument. Remember to change local to FALSE in order to ask for administrator privileges if you do not have the write access to that directory.

## Examples

if (FALSE) {
# install the latest version of EnergyPlus system-wide which is the default
install_eplus("latest")

# for a specific version of EnergyPlus
install_eplus(8.8)

# install EnergyPlus in your home directory
install_eplus(8.8, local = TRUE)

# custom EnergyPlus install home directory
install_eplus(8.8, dir = "~/MyPrograms", local = TRUE)
}