These functions test if input is a valid object of Idd, Idf, Epw and other main classes.

is_eplus_ver(ver, strict = FALSE)

is_idd_ver(ver, strict = FALSE)

is_eplus_path(path)

is_idd(x)

is_idf(x)

is_iddobject(x)

is_idfobject(x)

is_epw(x)

Arguments

ver

A character or numeric vector with suitable numeric version strings.

strict

If FALSE, ver can be a special string "latest" which represents the latest version.

path

A path to test.

x

An object to test.

Value

A logical vector.

Details

is_eplus_ver() returns TRUE if input is a valid EnergyPlus version.

is_idd_ver() returns TRUE if input is a valid EnergyPlus IDD version.

is_eplus_path() returns TRUE if input path is a valid EnergyPlus path, i.e. a path where there is an energyplus executable and an Energy+.idd file.

is_idd() returns TRUE if input is an Idd object.

is_idf() returns TRUE if input is an Idf object.

is_iddobject() returns TRUE if input is an IddObject object.

is_idfobject() returns TRUE if input is an IdfObject object.

is_epw() returns TRUE if input is an Epw object.

Examples

is_eplus_ver("8.8")
#> [1] TRUE
is_eplus_ver("8.0")
#> [1] TRUE
is_eplus_ver("latest", strict = FALSE)
#> [1] TRUE

is_idd_ver("9.0.1")
#> [1] TRUE
is_idd_ver("8.0.1")
#> [1] FALSE

is_eplus_path("C:/EnergyPlusV9-0-0")
#> [1] FALSE
is_eplus_path("/usr/local/EnergyPlus-9-0-1")
#> [1] FALSE

if (FALSE) {
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"))
is_idf(idf)

is_iddobject(idd_object("8.8", "Version"))

is_idfobject(idf_object(idf, 1))

is_epw(read_epw(download_weather("los angeles.*tmy3", type = "epw", ask = FALSE, max_match = 1)))
}