Transform Spec Object(s) Into a Dataframe
Spec2DF.Rd
Transform Spec Object(s) Into a Dataframe
See also
Other TidySpec:
DF2Spec()
,
as.data.frame.spec()
,
as.spec()
,
as_spec_df()
Examples
library(PaleoSpec)
ts1 <- ts(SimPLS(1000, beta = 1))
sp1 <- SpecMTM(ts1)
sp1 <- AddConfInterval(sp1)
ts2 <- ts(rnorm(1000))
sp2 <- SpecMTM(ts2)
sp_lst <- list(sp1 = sp1, sp2 = sp2)
sp_df <- Spec2DF(sp_lst)
sp_df
#> # A tibble: 1,000 × 6
#> spec_id freq spec dof lim.1 lim.2
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 sp1 0.001 16.5 5.98 39.8 3.39
#> 2 sp1 0.002 31.7 5.96 76.5 6.49
#> 3 sp1 0.003 21.2 5.99 51.2 4.38
#> 4 sp1 0.004 31.7 5.99 76.5 6.54
#> 5 sp1 0.005 28.9 5.98 69.6 5.93
#> 6 sp1 0.006 11.6 5.98 28.1 2.39
#> 7 sp1 0.007 6.74 5.95 16.3 1.38
#> 8 sp1 0.008 6.76 5.95 16.3 1.38
#> 9 sp1 0.009 1.72 5.90 4.16 0.348
#> 10 sp1 0.01 2.98 5.96 7.20 0.610
#> # ℹ 990 more rows