| tsl_join | R Documentation |
Joins an arbitrary of time series lists by name and time. Pairs of zoo objects are joined with zoo::merge.zoo(). Names that are not shared across all input TSLs are ignored, and observations with no matching time are filled with NA and then managed via tsl_handle_NA() depending on the value of the argument na_action.
tsl_join(..., na_action = "impute")
... |
(required, time series lists) names of the time series lists to merge. |
na_action |
(required, character) NA handling action. Available options are:
|
time series list
Other tsl_management:
tsl_burst(),
tsl_colnames_clean(),
tsl_colnames_get(),
tsl_colnames_prefix(),
tsl_colnames_set(),
tsl_colnames_suffix(),
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_to_df()
#generate two time series list to join
tsl_a <- tsl_simulate(
n = 2,
cols = 2,
irregular = TRUE,
seed = 1
)
#needs renaming
tsl_b <- tsl_simulate(
n = 3,
cols = 2,
irregular = TRUE,
seed = 2
) |>
tsl_colnames_set(
names = c("c", "d")
)
#join
tsl <- tsl_join(
tsl_a,
tsl_b
)
#plot result
if(interactive()){
tsl_plot(
tsl = tsl
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.