transition()
takes an Idf object or a path of IDF file and a target
version, performs version transitions and returns an Idf object of
specified version.
transition(idf, ver, keep_all = FALSE, save = FALSE, dir = NULL)
idf | An Idf object or a path of IDF file. |
---|---|
ver | A valid EnergyPlus IDD version, e.g. |
keep_all | If |
save | If |
dir | Only applicable when |
An Idf object if keep_all
is FALSE
or a list of Idf objects
if keep_all
is TRUE
.
See version_updater()
which directly call EnergyPlus preprocessor
IDFVersionUpdater
to perform the version transitions.
Hongyuan Jia
if (FALSE) { if (any(avail_eplus()) > 7.2) { # create an empty IDF idf <- empty_idf(7.2) # convert it from v7.2 to the latest EnergyPlus installed transition(idf, max(avail_eplus())) # convert it from v7.2 to the latest EnergyPlus installed and keep all # intermediate versions transition(idf, max(avail_eplus()), keep_all = TRUE) # convert it from v7.2 to the latest EnergyPlus installed and keep all # intermediate versions and save all them idf$save(tempfile(fileext = ".idf")) transition(idf, max(avail_eplus()), keep_all = TRUE, save = TRUE, dir = tempdir() ) } }