The `fits`-list column gets unnested. This function is useful if the fitted signal-values are processed further.
mbte_unnest_fits(x)
x | A |
---|
A tbl_mbte
with the following columns:
`desc` is a placeholder for all columns except the `signal`- and the `fits`-columns. Those columns can be seen as "descriptive" columns describing the measured signals.
The name of the method used for fitting (character). See
mbte_fit
for details.
The time-column unnested from the `signal`-column.
The values of the predicted signals (originally in `signal`- column).
filtered_signals
(dataset used in examples)
Other unnesting functions: mbte_unnest_signals
#> # A tibble: 37 x 3 #> mv signal_nr signal #> <chr> <int> <list> #> 1 mv1 1 <tibble [22 × 2]> #> 2 mv3 2 <tibble [22 × 2]> #> 3 mv5 1 <tibble [30 × 2]> #> 4 mv6 1 <tibble [21 × 2]> #> 5 mv6 3 <tibble [30 × 2]> #> 6 mv7 1 <tibble [56 × 2]> #> 7 mv8 1 <tibble [29 × 2]> #> 8 mv8 2 <tibble [26 × 2]> #> 9 mv9 1 <tibble [63 × 2]> #> 10 mv10 1 <tibble [25 × 2]> #> # … with 27 more rows# perform fitting fitted <- mbte_fit(filtered_signals, lm = lm(value ~ t, .signal)) # unnest predictions for signal-values (==> fitted signals) # # NOTE: "lm" is the only method used for fitting and therefore the `fit`- # column consists only of "lm" mbte_unnest_fits(fitted)#> # A tibble: 1,367 x 5 #> mv signal_nr fit t value #> <chr> <int> <chr> <int> <dbl> #> 1 mv1 1 lm 29 29.5 #> 2 mv1 1 lm 30 28.3 #> 3 mv1 1 lm 31 27.0 #> 4 mv1 1 lm 32 25.8 #> 5 mv1 1 lm 33 24.5 #> 6 mv1 1 lm 34 23.2 #> 7 mv1 1 lm 35 22.0 #> 8 mv1 1 lm 36 20.7 #> 9 mv1 1 lm 37 19.5 #> 10 mv1 1 lm 38 18.2 #> # … with 1,357 more rows