The `signal`-list column gets unnested. This function can be seen as the
inversion of mbte_nest_signals
.
mbte_unnest_signals(x)
x | A |
---|
A tbl_mbte
with the following columns:
`desc` is a placeholder for all the columns except the `fits`- column. Those columns can be seen as descriptive columns.
The time column (originally in the `signal`-column).
The signal-values (before in the `signal`-list-column).
The `fits`-column will be removed, if it is present.
raw_signals
(dataset used in examples)
Other unnesting functions: mbte_unnest_fits
#> # A tibble: 4,200 x 3 #> t mv value #> <int> <chr> <dbl> #> 1 1 mv1 0 #> 2 2 mv1 0 #> 3 3 mv1 0 #> 4 4 mv1 0 #> 5 5 mv1 0 #> 6 6 mv1 0 #> 7 7 mv1 0 #> 8 8 mv1 0 #> 9 9 mv1 0 #> 10 10 mv1 0 #> # … with 4,190 more rows# 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#> [1] TRUE