A time series list has two sets of names: the names of the list items (as returned by names(tsl)
), and the names of the contained zoo objects, as stored in their attribute "name". These names should ideally be the same, for the sake of data consistency. This function extracts either set of names,
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_set()
,
tsl_names_test()
,
tsl_ncol()
,
tsl_nrow()
,
tsl_repair()
,
tsl_split()
,
tsl_subset()
,
tsl_time()
,
tsl_time_class_set()
,
tsl_to_df()
Examples
#initialize a time series list
tsl <- tsl_initialize(
x = fagus_dynamics,
name_column = "name",
time_column = "time"
)
#get names of zoo objects
tsl_names_get(
tsl = tsl,
zoo = TRUE
)
#> Germany Spain Sweden
#> "Germany" "Spain" "Sweden"
#get list names only
tsl_names_get(
tsl = tsl,
zoo = FALSE
)
#> [1] "Germany" "Spain" "Sweden"
#same as
names(tsl)
#> [1] "Germany" "Spain" "Sweden"