}}
\preformatted{\dontrun{
-if (is_avail_eplus(8.8)) {
+if (is_avail_eplus("8.8")) {
idf_name <- "1ZoneUncontrolled.idf"
epw_name <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
- idf_path <- file.path(eplus_config(8.8)$dir, "ExampleFiles", idf_name)
- epw_path <- file.path(eplus_config(8.8)$dir, "WeatherData", epw_name)
+ idf_path <- path_eplus_example("8.8", idf_name)
+ epw_path <- path_eplus_weather("8.8", epw_name)
# copy to tempdir and run the model
idf <- read_idf(idf_path)
diff --git a/man/ParametricJob.Rd b/man/ParametricJob.Rd
index 738ba9628..0656354d9 100644
--- a/man/ParametricJob.Rd
+++ b/man/ParametricJob.Rd
@@ -40,9 +40,9 @@ automatically created if it does not exists, like \link{Idf} class does.
## ------------------------------------------------
\dontrun{
-if (is_avail_eplus(8.8)) {
- path_idf <- path_eplus_example(8.8, "5Zone_Transformer.idf")
- path_epw <- path_eplus_weather(8.8, "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw")
+if (is_avail_eplus("8.8")) {
+ path_idf <- path_eplus_example("8.8", "5Zone_Transformer.idf")
+ path_epw <- path_eplus_weather("8.8", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw")
# create from an IDF and an EPW
param <- param_job(path_idf, path_epw)
@@ -131,7 +131,7 @@ param$param(
\dontrun{
# create a measure to change the orientation of the building
-rotate_building <- function (idf, degree = 0L) {
+rotate_building <- function(idf, degree = 0L) {
if (!idf$is_valid_class("Building")) {
stop("Input model does not have a Building object")
}
@@ -301,9 +301,9 @@ A \code{ParametricJob} object.
\subsection{Examples}{
\if{html}{\out{
}}
\preformatted{\dontrun{
-if (is_avail_eplus(8.8)) {
- path_idf <- path_eplus_example(8.8, "5Zone_Transformer.idf")
- path_epw <- path_eplus_weather(8.8, "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw")
+if (is_avail_eplus("8.8")) {
+ path_idf <- path_eplus_example("8.8", "5Zone_Transformer.idf")
+ path_epw <- path_eplus_weather("8.8", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw")
# create from an IDF and an EPW
param <- param_job(path_idf, path_epw)
@@ -561,7 +561,7 @@ The modified \code{ParametricJob} object itself, invisibly.
\if{html}{\out{
}}
\preformatted{\dontrun{
# create a measure to change the orientation of the building
-rotate_building <- function (idf, degree = 0L) {
+rotate_building <- function(idf, degree = 0L) {
if (!idf$is_valid_class("Building")) {
stop("Input model does not have a Building object")
}
diff --git a/man/as.character.IdfObject.Rd b/man/as.character.IdfObject.Rd
index 943684a2b..770c42ba1 100644
--- a/man/as.character.IdfObject.Rd
+++ b/man/as.character.IdfObject.Rd
@@ -30,7 +30,7 @@ Coerce an \link{IdfObject} into a character vector in the same way as in IDF Edi
\examples{
\dontrun{
idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"),
- idd = use_idd(8.8, download = "auto"))
+ idd = use_idd("8.8", download = "auto"))
# get the IdfObject of material named "C5 - 4 IN HW CONCRETE"
mat <- idf$Material[["C5 - 4 IN HW CONCRETE"]]
diff --git a/man/assertion.Rd b/man/assertion.Rd
index d9d988ae5..19b27d2f7 100644
--- a/man/assertion.Rd
+++ b/man/assertion.Rd
@@ -65,8 +65,8 @@ file.
\code{is_epw()} returns \code{TRUE} if input is an Epw object.
}
\examples{
-is_eplus_ver(8.8)
-is_eplus_ver(8.0)
+is_eplus_ver("8.8")
+is_eplus_ver("8.0")
is_eplus_ver("latest", strict = FALSE)
is_idd_ver("9.0.1")
@@ -75,17 +75,17 @@ is_idd_ver("8.0.1")
is_eplus_path("C:/EnergyPlusV9-0-0")
is_eplus_path("/usr/local/EnergyPlus-9-0-1")
-is_idd(use_idd(8.8, download = "auto"))
+\dontrun{
+is_idd(use_idd("8.8", download = "auto"))
idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"),
- idd = use_idd(8.8, download = "auto"))
+ idd = use_idd("8.8", download = "auto"))
is_idf(idf)
-is_iddobject(idd_object(8.8, "Version"))
+is_iddobject(idd_object("8.8", "Version"))
is_idfobject(idf_object(idf, 1))
-\dontrun{
is_epw(read_epw(download_weather("los angeles.*tmy3", type = "epw", ask = FALSE, max_match = 1)))
}
}
diff --git a/man/clean_wd.Rd b/man/clean_wd.Rd
index f58707be8..0b3935cb8 100644
--- a/man/clean_wd.Rd
+++ b/man/clean_wd.Rd
@@ -24,7 +24,7 @@ running EnergyPlus models using \code{\link[=run_idf]{run_idf()}} and \code{\lin
\dontrun{
# run a test simulation
idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
-epw_path <- file.path(eplus_config(8.8)$dir, "WeatherData",
+epw_path <- path_eplus_weather("8.8",
"USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
)
dir <- file.path(tempdir(), "test")
diff --git a/man/format.IdfObject.Rd b/man/format.IdfObject.Rd
index 0c8e5e63a..224a8e215 100644
--- a/man/format.IdfObject.Rd
+++ b/man/format.IdfObject.Rd
@@ -30,7 +30,7 @@ Format an \link{IddObject} into a character vector in the same way as in IDF Edi
\examples{
\dontrun{
idf <- read_idf(system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr"),
- idd = use_idd(8.8, download = "auto"))
+ idd = use_idd("8.8", download = "auto"))
# get the IdfObject of material named "C5 - 4 IN HW CONCRETE"
mat <- idf$Material[["C5 - 4 IN HW CONCRETE"]]
diff --git a/man/idd_object.Rd b/man/idd_object.Rd
index fd114b121..180772d44 100644
--- a/man/idd_object.Rd
+++ b/man/idd_object.Rd
@@ -20,11 +20,11 @@ corresponding \link{IddObject}. For details, see \link{IddObject}.
}
\examples{
\dontrun{
-idd <- use_idd(8.8, download = "auto")
+idd <- use_idd("8.8", download = "auto")
# get an IddObject using class name
idd_object(idd, "Material")
-idd_object(8.8, "Material")
+idd_object("8.8", "Material")
}
}
diff --git a/man/install_eplus.Rd b/man/install_eplus.Rd
index 8e0568fbe..c51c59ac4 100644
--- a/man/install_eplus.Rd
+++ b/man/install_eplus.Rd
@@ -13,7 +13,7 @@ uninstall_eplus(ver)
download_eplus(ver = "latest", dir)
}
\arguments{
-\item{ver}{The EnergyPlus version number, e.g., \code{8.7}. For \code{download_eplus()}
+\item{ver}{The EnergyPlus version number, e.g., \code{"8.7"}. For \code{download_eplus()}
and \code{install_eplus()}, the special value \code{"latest"}, which is the
default, means the latest version supported by eplusr.}
@@ -120,17 +120,17 @@ download_eplus("latest", dir = tempdir())
install_eplus("latest")
# for a specific version of EnergyPlus
-download_eplus(8.8, dir = tempdir())
-install_eplus(8.8)
+download_eplus("8.8", dir = tempdir())
+install_eplus("8.8")
# force to reinstall
-install_eplus(8.8, force = TRUE)
+install_eplus("8.8", force = TRUE)
# install EnergyPlus in your home directory
-install_eplus(8.8, local = TRUE, force = TRUE)
+install_eplus("8.8", local = TRUE, force = TRUE)
# custom EnergyPlus install home directory
-install_eplus(8.8, dir = "~/MyPrograms", local = TRUE, force = TRUE)
+install_eplus("8.8", dir = "~/MyPrograms", local = TRUE, force = TRUE)
}
}
\author{
diff --git a/man/path_eplus.Rd b/man/path_eplus.Rd
index 6c95f666a..7c91a6946 100644
--- a/man/path_eplus.Rd
+++ b/man/path_eplus.Rd
@@ -49,18 +49,18 @@ folder in EnergyPlus installation directory.
}
\examples{
\dontrun{
-path_eplus(8.8, "Energy+.idd")
+path_eplus("8.8", "Energy+.idd")
-path_eplus_processor(8.8, "EPMacro", strict = TRUE)
-path_eplus_processor(8.8, "PreProcess", "GrndTempCalc", "Slab", strict = TRUE)
+path_eplus_processor("8.8", "EPMacro", strict = TRUE)
+path_eplus_processor("8.8", "PreProcess", "GrndTempCalc", "Slab", strict = TRUE)
-path_eplus_example(8.8, "1ZoneUncontrolled.idf")
-path_eplus_example(8.8, "BasicFiles/Exercise1A.idf")
+path_eplus_example("8.8", "1ZoneUncontrolled.idf")
+path_eplus_example("8.8", "BasicFiles/Exercise1A.idf")
-path_eplus_weather(8.8, "USA_CA_San.Francisco.Intl.AP.724940_TMY3.ddy")
+path_eplus_weather("8.8", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.ddy")
-path_eplus_dataset(8.8, "Boilers.idf")
-path_eplus_dataset(8.8, "FMUs/MoistAir.fmu")
+path_eplus_dataset("8.8", "Boilers.idf")
+path_eplus_dataset("8.8", "FMUs/MoistAir.fmu")
}
}
\author{
diff --git a/man/rdd.Rd b/man/rdd.Rd
index 224e0fcc0..539ae3257 100644
--- a/man/rdd.Rd
+++ b/man/rdd.Rd
@@ -57,8 +57,8 @@ simulation.
# run simulation and get the err file
idf_name <- "1ZoneUncontrolled.idf"
epw_name <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
-idf_path <- file.path(eplus_config(8.8)$dir, "ExampleFiles", idf_name)
-epw_path <- file.path(eplus_config(8.8)$dir, "WeatherData", epw_name)
+idf_path <- path_eplus_example("8.8", idf_name)
+epw_path <- path_eplus_weather("8.8", epw_name)
job <- eplus_job(idf_path, epw_path)
job$run(dir = tempdir())
diff --git a/man/read_idf.Rd b/man/read_idf.Rd
index 699560f06..da95f0205 100644
--- a/man/read_idf.Rd
+++ b/man/read_idf.Rd
@@ -43,17 +43,17 @@ idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr") # v
# if EnergyPlus v8.8 is found but Idd v8.8 was not, `Energy+.idd` in EnergyPlus
# installation folder will be used for pasing
# if Idd v8.8 is found, it will be used automatically
-is_avail_eplus(8.8)
-is_avail_idd(8.8)
+is_avail_eplus("8.8")
+is_avail_idd("8.8")
read_idf(idf_path)
# argument `idd` can be specified explicitly using `use_idd()`
-read_idf(idf_path, idd = use_idd(8.8))
+read_idf(idf_path, idd = use_idd("8.8"))
# you can set `download` arugment to "auto" in `use_idd()` if you want to
# automatically download corresponding IDD file when necessary
-read_idf(idf_path, use_idd(8.8, download = "auto"))
+read_idf(idf_path, use_idd("8.8", download = "auto"))
# Besides use a path to an IDF file, you can also provide IDF in literal
# string format
@@ -64,7 +64,7 @@ idf_string <-
Building; !- Name
"
-read_idf(idf_string, use_idd(8.8, download = "auto"))
+read_idf(idf_string, use_idd("8.8", download = "auto"))
}
}
\seealso{
diff --git a/man/read_idfeditor_copy.Rd b/man/read_idfeditor_copy.Rd
index c7f8f453a..56b7ea20a 100644
--- a/man/read_idfeditor_copy.Rd
+++ b/man/read_idfeditor_copy.Rd
@@ -13,9 +13,9 @@ field, and reference.}
\item{idf_env}{An environment or list contains IDF tables including object,
value, and reference.}
-\item{version}{The version of IDF file open by IDF Editor, e.g. \code{8.6},
+\item{version}{The version of IDF file open by IDF Editor, e.g. \code{"8.6"},
\code{"8.8.0"}. If \code{NULL}, assume that the file has the same
-version as current Idf object. Default: \code{NULL}.}
+version as current \code{Idf} object. Default: \code{NULL}.}
\item{in_ip}{Set to \code{TRUE} if the IDF file is open with \code{Inch-Pound}
view option toggled. Numeric values will automatically
diff --git a/man/run_model.Rd b/man/run_model.Rd
index fdc5fe0d6..cab274354 100644
--- a/man/run_model.Rd
+++ b/man/run_model.Rd
@@ -158,10 +158,10 @@ paths or copy them into the output directory, based on your choice.
\dontrun{
idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
-if (is_avail_eplus(8.8)) {
+if (is_avail_eplus("8.8")) {
# run a single model
epw_path <- file.path(
- eplus_config(8.8)$dir,
+ eplus_config("8.8")$dir,
"WeatherData",
"USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
)
@@ -169,7 +169,7 @@ if (is_avail_eplus(8.8)) {
run_idf(idf_path, epw_path, output_dir = tempdir())
# run multiple model in parallel
- idf_paths <- file.path(eplus_config(8.8)$dir, "ExampleFiles",
+ idf_paths <- file.path(eplus_config("8.8")$dir, "ExampleFiles",
c("1ZoneUncontrolled.idf", "1ZoneUncontrolledFourAlgorithms.idf")
)
epw_paths <- rep(epw_path, times = 2L)
diff --git a/man/transition.Rd b/man/transition.Rd
index 49e23ddd9..19715c641 100644
--- a/man/transition.Rd
+++ b/man/transition.Rd
@@ -9,7 +9,7 @@ transition(idf, ver, keep_all = FALSE, save = FALSE, dir = NULL)
\arguments{
\item{idf}{An \link{Idf} object or a path of IDF file.}
-\item{ver}{A valid EnergyPlus IDD version, e.g. \code{9}, \code{8.8}, or \code{"8.8.0"}.}
+\item{ver}{A valid EnergyPlus IDD version, e.g. \code{"9"}, \code{"8.8"}, or \code{"8.8.0"}.}
\item{keep_all}{If \code{TRUE}, a list will be return which contains all
\link{Idf} objects of intermediate versions. The list will be named using first
@@ -35,9 +35,9 @@ specified version.
}
\examples{
\dontrun{
-if (any(avail_eplus()) > 7.2) {
+if (any(avail_eplus()) > "7.2") {
# create an empty IDF
- idf <- empty_idf(7.2)
+ idf <- empty_idf("7.2")
# convert it from v7.2 to the latest EnergyPlus installed
transition(idf, max(avail_eplus()))
diff --git a/man/use_eplus.Rd b/man/use_eplus.Rd
index e64a2c140..6e93d3675 100644
--- a/man/use_eplus.Rd
+++ b/man/use_eplus.Rd
@@ -38,10 +38,9 @@ available EnergyPlus is found;
Configure which version of EnergyPlus to use
}
\details{
-\code{use_eplus()} adds an EnergyPlus version into the EnergyPlus version
-cache in eplusr. That cache will be used to get corresponding
-\link{Idd} object when parsing IDF files and call corresponding
-EnergyPlus to run models.
+\code{use_eplus()} adds an EnergyPlus version into the EnergyPlus version cache in
+eplusr. That cache will be used to get corresponding \link{Idd} object when
+parsing IDF files and call corresponding EnergyPlus to run models.
\code{eplus_config()} returns the a list of configure data of specified version of
EnergyPlus. If no data found, an empty list will be returned.
@@ -59,19 +58,19 @@ available or not.
\examples{
\dontrun{
# add specific version of EnergyPlus
-use_eplus(8.9)
+use_eplus("8.9")
use_eplus("8.8.0")
# get configure data of specific EnergyPlus version if avaiable
-eplus_config(8.6)
+eplus_config("8.6")
}
# get all versions of avaiable EnergyPlus
avail_eplus()
# check if specific version of EnergyPlus is available
-is_avail_eplus(8.5)
-is_avail_eplus(8.8)
+is_avail_eplus("8.5")
+is_avail_eplus("8.8")
}
\seealso{
diff --git a/man/use_idd.Rd b/man/use_idd.Rd
index 764ebbec9..89e7bac69 100644
--- a/man/use_idd.Rd
+++ b/man/use_idd.Rd
@@ -19,7 +19,7 @@ is_avail_idd(ver)
\item{idd}{Either a path, a connection, or literal data (either a single
string or a raw vector) to an EnergyPlus Input Data Dictionary (IDD)
file, usually named as \code{Energy+.idd}, or a valid version of IDD, e.g.
-\code{8.9}, \code{"8.9.0"}.}
+\code{"8.9"}, \code{"8.9.0"}.}
\item{download}{If \code{TRUE} and argument \code{idd}, the IDD file will be
downloaded from \href{https://github.com/NREL/EnergyPlus}{EnergyPlus GitHub Repository},
@@ -34,7 +34,7 @@ whole EnergyPlus software. Default is \code{FALSE}.}
\verb{"Latin-1" and }"UTF-8"\verb{. The default is }"unknown"` which means that the
file is encoded in the native encoding.}
-\item{ver}{A valid EnergyPlus version, e.g. \code{8}, \code{8.7}, \code{"8.7"} or \code{"8.7.0"}.
+\item{ver}{A valid EnergyPlus version, e.g. \code{"8"}, \code{"8.7"} or \code{"8.7.0"}.
For \code{download_idd()}, the special value \code{"latest"}, which is default,
means the latest version.}
@@ -86,24 +86,24 @@ from the latest EnergyPlus detected.
avail_idd()
# check if specific version of Idd is available
-is_avail_idd(8.5)
+is_avail_idd("8.5")
# download latest IDD file from EnergyPlus GitHub repo
str(download_idd("latest", tempdir()))
# use specific version of Idd
# only works if EnergyPlus v8.8 has been found or Idd v8.8 exists
-use_idd(8.8)
+use_idd("8.8")
# If Idd object is currently not avail_idd, automatically download IDD file
# from EnergyPlus GitHub repo and parse it
-use_idd(8.8, download = "auto")
+use_idd("8.8", download = "auto")
# now Idd v8.8 should be available
-is_avail_idd(8.8)
+is_avail_idd("8.8")
# get specific version of parsed Idd object
-use_idd(8.8)
+use_idd("8.8")
avail_idd() # should contain "8.8.0"
}
diff --git a/man/version_updater.Rd b/man/version_updater.Rd
index 136e2e4e3..c901ce027 100644
--- a/man/version_updater.Rd
+++ b/man/version_updater.Rd
@@ -9,7 +9,7 @@ version_updater(idf, ver, dir = NULL, keep_all = FALSE)
\arguments{
\item{idf}{An \link{Idf} object or a path of IDF file.}
-\item{ver}{A valid EnergyPlus IDD version, e.g. \code{9}, \code{8.8}, or \code{"8.8.0"}.}
+\item{ver}{A valid EnergyPlus IDD version, e.g. \code{"9"}, \code{"8.8"}, or \code{"8.8.0"}.}
\item{dir}{The directory to save the new IDF files. If the directory does not
exist, it will be created before save. If \code{NULL}, the directory of input
@@ -37,9 +37,9 @@ An attribute named \code{errors} is attached which is a list of
}
\examples{
\dontrun{
-if (any(avail_eplus()) > 7.2) {
+if (any(avail_eplus()) > "7.2") {
# create an empty IDF
- idf <- empty_idf(7.2)
+ idf <- empty_idf("7.2")
idf$save(tempfile(fileext = ".idf"))
# convert it from v7.2 to the latest EnergyPlus installed
diff --git a/man/with_option.Rd b/man/with_option.Rd
index 9ccc25e79..d0238f6a4 100644
--- a/man/with_option.Rd
+++ b/man/with_option.Rd
@@ -37,7 +37,7 @@ These functions evaluate an expression with temporary eplusr options
path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
# temporarily disable verbose messages
-idf <- with_silent(read_idf(path_idf, use_idd(8.8, download = "auto")))
+idf <- with_silent(read_idf(path_idf, use_idd("8.8", download = "auto")))
# temporarily disable checkings
without_checking(idf$'BuildingSurface:Detailed' <- NULL)
diff --git a/vignettes/eplusr.Rmd b/vignettes/eplusr.Rmd
index 05820bc93..f2d89df19 100644
--- a/vignettes/eplusr.Rmd
+++ b/vignettes/eplusr.Rmd
@@ -523,7 +523,7 @@ from a ".ddy" file. You can achieve that using `$insert()`.
```{r ddy, out.lines = 20}
# read ddy file as normal IDF
-path_ddy <- path_eplus_weatehr("23.1", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.ddy")
+path_ddy <- path_eplus_weather("23.1", "USA_CA_San.Francisco.Intl.AP.724940_TMY3.ddy")
ddy <- read_idf(path_ddy, idd = model$version(), encoding = "Latin-1")
model$insert(ddy$SizingPeriod_DesignDay)