Description Usage Arguments Details See Also Examples
This function is used to readd dropped-attributes, if a
tbl_mbte
-object gets processed by functions, which may drop
additional attributes.
1 2 3 4 | mbte_reconstruct(new, old)
## S3 method for class '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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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
is_tbl_mbte(target) # FALSE
# reconstruct valid tbl_mbte from template
target <- mbte_reconstruct(target, template)
is_tbl_mbte(target) # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.