This function is used to readd dropped-attributes, if a
tbl_mbte-object gets processed by functions, which may drop
additional attributes.
mbte_reconstruct(new, old) # S3 method for tbl_mbte mbte_reconstruct(new, old)
| new | Object, which the attributes should be added to (must be convertible to a tibble). |
|---|---|
| old |
|
The implementation of sloop::reconstruct() gets used; This is a
temporary workaround and will be removed, once the
sloop-package is on CRAN.
raw_signals (dataset used in examples)
Other tbl_mbte functions: is_tbl_mbte,
new_tbl_mbte, tbl_mbte
data(raw_signals) # create template object for attribute reconstruction template <- new_tbl_mbte(raw_signals, time = "t", value = "value") # create target object, which lacks of the "time"-attribute target <- new_tbl_mbte(raw_signals, time = "t", value = "value") attr(target, "time") <- NULL#> [1] FALSE# reconstruct valid tbl_mbte from template target <- mbte_reconstruct(target, template)#> [1] TRUE