| dt_to_load {eplusr} | R Documentation |
Format Long Table to Standard Input for Idf$load() Method
Description
dt_to_load() takes a data.table, usually
created from Idf$to_table() or IdfObject$to_table()
with wide being TRUE, and format it into a
data.table in acceptable format for $load()
method in Idf class.
Usage
dt_to_load(dt, string_value = TRUE)
Arguments
dt |
A data.table created using |
string_value |
If |
Value
A data.table with 5 or 6 columns:
-
id: Integer type. Used to distinguish each object definition. -
name: Character type. Only exists when inputdthas anamecolumn. -
class: Character type. -
index: Integer type. Field indices. -
field: Character type. Field names. -
value: Character or list type. The value of each field to be added.
Examples
## Not run:
# read an example distributed with eplusr
path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
idf <- read_idf(path_idf)
# extract all material object data and return it as a wide table
dt <- idf$to_table(class = "Material", wide = TRUE)
dt_to_load(dt)
## End(Not run)