install_eplus {eplusr} | R Documentation |
Download and Install EnergyPlus
Description
Download specified version of EnergyPlus for your platform from GitHub and install it.
Usage
install_eplus(ver = "latest", local = FALSE, dir = NULL, force = FALSE, ...)
uninstall_eplus(ver)
download_eplus(ver = "latest", dir)
Arguments
ver |
The EnergyPlus version number, e.g., |
local |
Whether to install EnergyPlus only for current user. For Windows
and Linux, if |
dir |
A single string of directory.
|
force |
Whether to install EnergyPlus even if it has already been
installed. Setting to |
... |
Other arguments to be passed to the installer. Current only one additional argument exists and is only for Linux:
|
Details
download_eplus()
downloads specified version of EnergyPlus from
EnergyPlus GitHub Repository.
install_eplus()
tries 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 can'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.
Please note that when local
is set to FALSE
, no symbolic links
will be created, since this process requires administrative privileges.
uninstall_eplus()
tries to uninstall specified version of EnergyPlus
located by eplusr. Similar as install_eplus()
, administrative privileges
may be required.
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
-
Author(s)
Hongyuan Jia
Examples
## Not run:
# download the latest version of EnergyPlus
download_eplus("latest", dir = tempdir())
# install the latest version of EnergyPlus system-wide which is the default
# and requires administrative privileges
install_eplus("latest")
# for a specific version of EnergyPlus
download_eplus("8.8", dir = tempdir())
install_eplus("8.8")
# force to reinstall
install_eplus("8.8", force = TRUE)
# install EnergyPlus in your home directory
install_eplus("8.8", local = TRUE, force = TRUE)
# custom EnergyPlus install home directory
install_eplus("8.8", dir = "~/MyPrograms", local = TRUE, force = TRUE)
## End(Not run)