This function takes a time series list with multivariate zoo objects to generate a new one with univariate zoo objects. A time series list with the the zoo objects "A" and "B", each with the columns "a", "b", and "c", becomes a time series list with the zoo objects "A__a", "A__b", "A__c", "B__a", "B__b", and "B__c". The only column of each new zoo object is named "x".
See also
Other tsl_management:
tsl_colnames_clean()
,
tsl_colnames_get()
,
tsl_colnames_set()
,
tsl_count_NA()
,
tsl_diagnose()
,
tsl_handle_NA()
,
tsl_names_clean()
,
tsl_names_get()
,
tsl_names_set()
,
tsl_names_test()
,
tsl_ncol()
,
tsl_nrow()
,
tsl_repair()
,
tsl_subset()
,
tsl_time()
,
tsl_time_class_set()
,
tsl_to_df()
Examples
tsl <- tsl_simulate(
n = 2,
time_range = c(
"2010-01-01",
"2024-12-31"
),
cols = 3
)
names(tsl)
#> [1] "A" "B"
if(interactive()){
tsl_plot(tsl = tsl)
}
tsl <- tsl_split(tsl = tsl)
names(tsl)
#> [1] "A__a" "A__b" "A__c" "B__a" "B__b" "B__c"
if(interactive()){
tsl_plot(tsl = tsl)
}
lapply(tsl, colnames)
#> $A__a
#> [1] "x"
#>
#> $A__b
#> [1] "x"
#>
#> $A__c
#> [1] "x"
#>
#> $B__a
#> [1] "x"
#>
#> $B__b
#> [1] "x"
#>
#> $B__c
#> [1] "x"
#>