new_tbl_mbte: Create a new 'tbl_mbte'.

Description Usage Arguments Value Note See Also Examples

View source: R/tbl_mbte.R

Description

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.

Usage

1
2
new_tbl_mbte(x, time, value, ..., signal = "signal", fits = "fits",
  subclass = NULL)

Arguments

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).

Value

A tbl_mbte wrapping x will be returned. The resulting object is a tibble under the hood and can be used as such.

Note

Errors about missing or malformatted columns will not be rasised by this function.

See Also

raw_signals (dataset used in examples)

Other tbl_mbte functions: is_tbl_mbte, mbte_reconstruct, tbl_mbte

Examples

 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)

mkerschbaumer/mbte documentation built on May 5, 2019, 11:01 p.m.