Replace elements in some building part of a model

replace_in_building(l, element, type, value)

Arguments

l,

list, corresponding to a subset of building part a model

element,

character of length 1, where in the list should be find what to change

type,

character of length 2, giving correspondence between original and final type

value,

named vector, giving correspondence between new values (values) and old ones (names)

Value

a list of same structure than l with types ans values changed.

Examples

if (FALSE) {
model  = load_model("test_1", "dwelling")
building = replace_in_building(model[["building"]][["building"]])
}