expand_idf_dots_literal | R Documentation |
Parse object values given in literal character vectors or data.frames
expand_idf_dots_literal(idd_env, idf_env, ..., .default = TRUE, .exact = FALSE)
idd_env |
An environment or list contains IDD tables including class, field, and reference. |
idf_env |
An environment or list contains IDF tables including object, value, and reference. |
... |
Character vectors or data.frames. |
.default |
If |
.exact |
If |
For object definitions in character vector format, they follow the same rules as a normal IDF file:
Each object starts with a class name and a comma (,
);
Separates each values with a comma (,
);
Ends an object with a semicolon (;
) for the last value.
Each character vector can contain:
One single object, e.g. c("Building,", "MyBuilding;")
, or "Building, MyBuilding;".
Multiple objects, e.g. c("Building, MyBuilding;", "SimulationControl, Yes")
.
You can also provide an option header to indicate if input objects are
presented in IP units, using !-Option ViewInIPunits
. If this header does
not exist, then all values are treated as in SI units.
For object definitions in data.frame format, a valid definition requires at least three columns described below. Note that column order does not matter.
class
:Character type. Valid class names in the underlying
Idd object.
index
:Integer type. Valid field indices for each class.
value
:Character type or list type. Value for each field
to be added.
If character type, each value should be given as a string even if the corresponding field is a numeric type.
If list type, each value should have the right type as the corresponding field definition.
id
: Optional when .exact
is FALSE
. Integer type.
If input data.frame includes multiple object definitions in a same class,
values in id
column will be used to distinguish each definition. If id
column does not exists, it assumes that each definition is separated by
class
column and will issue an error if there is any duplication in the
index
column.
A named list of 2 element object
and value
which is a
data.table::data.table()
with object data and value data respectively.
Objects from character vectors will always be at the top of each table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.