R/rename.R
rename_per_field.Rd
rename_per_field()
renames all objects in specified class in format
class-field
, where class
and field
are character vectors created by
using class names and class_fun
, and field values and field_fun
,
respectivly.
rename_per_field( idf, class, field, class_fun = function(x) abbreviate(x, 10L), field_fun = NULL, strict = FALSE )
idf | An eplusr::Idf |
---|---|
class | A character vector of classes names |
field | An integer or a single string specifying the fields whose values
will be used as input passed to |
class_fun, field_fun | A function to take the corresponding class names
or field values as input, process them and return a character vector with the
same length. It can also be a named character vector. In this case, when
specified class names or field values match element value, the element name
will be used as part of the new name. If |
strict | If |
The modified eplusr::Idf object itself, invisiblly