mbte_unnest_signals: Perform unnesting of signals

Description Usage Arguments Value Note See Also Examples

View source: R/unnest.R

Description

The 'signal'-list column gets unnested. This function can be seen as the inversion of mbte_nest_signals.

Usage

1

Arguments

x

A tbl_mbte.

Value

A tbl_mbte with the following columns:

desc

'desc' is a placeholder for all the columns except the 'fits'- column. Those columns can be seen as descriptive columns.

time

The time column (originally in the 'signal'-column).

value

The signal-values (before in the 'signal'-list-column).

Note

The 'fits'-column will be removed, if it is present.

See Also

raw_signals (dataset used in examples)

Other unnesting functions: mbte_unnest_fits

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(dplyr, warn.conflicts = FALSE)
data(raw_signals)
raw_signals

# create a tbl_mbte to nest
tbl <- raw_signals %>%
  group_by(mv) %>%
  new_tbl_mbte(time = "t", value = "value")

# nest signals and unnest them (should be equal to `tbl`)
nested <- mbte_nest_signals(tbl)
unnested <- mbte_unnest_signals(nested)

all.equal(unnested, tbl) # TRUE

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