Description Usage Arguments Value Note See Also Examples
A new tbl_mbte
based on x
is created. The corresponding
column names for the 'time'-, 'value'-, 'signal'- and 'fits' columns are
passed as parameters as either strings or symbols
.
If symbols are passed, quasiquotation should be used.
1 2 | new_tbl_mbte(x, time, value, ..., signal = "signal", fits = "fits",
subclass = NULL)
|
x |
A data.frame or tibble. |
time |
The name of the time-column (gets quoted). |
value |
The name of the value column (measurement-data) - gets quoted. |
... |
Additional attributes, that are set (must be named). |
signal |
A name for a list column, in which tibbles containing the signal (time- and value- column combined) get stored - gets quoted. |
fits |
List-column-name; The predicted values for the original signal get stored in this list-column - gets quoted. |
subclass |
Additional classes to inherit from (character). |
A tbl_mbte
wrapping x
will be returned. The resulting
object is a tibble
under the hood and can be used
as such.
Errors about missing or malformatted columns will not be rasised by this function.
raw_signals
(dataset used in examples)
Other tbl_mbte functions: is_tbl_mbte
,
mbte_reconstruct
, tbl_mbte
1 2 3 4 5 6 7 8 9 10 11 12 | data(raw_signals)
# rely on quotation
## Not run: new_tbl_mbte(raw_signals, time = t, value = value)
# pass column names as strings
new_tbl_mbte(raw_signals, time = "t", value = "value")
# pass symbols using quasiquotation
time_sym <- rlang::sym("t")
value_sym <- rlang::sym("value")
new_tbl_mbte(raw_signals, time = !!time_sym, value = !!value_sym)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.