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 Idf$to_table() and IdfObject$to_table(). dt should at least contain column id (indicator used to distinguish object definitions), class (class names). If a name column exists, it will be preserved.

string_value

If TRUE, all value will be coerced into character and the value column of returned datat.table will be character type. If FALSE, the original value will be preserved and the value column of returned data.table will be list type.

Value

A data.table with 5 or 6 columns:

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)


[Package eplusr version 0.16.2 Index]