tsl_colnames_get: Get Column Names from a Time Series Lists

View source: R/tsl_colnames.R

tsl_colnames_getR Documentation

Get Column Names from a Time Series Lists

Description

Get Column Names from a Time Series Lists

Usage

tsl_colnames_get(tsl = NULL, names = c("all", "shared", "exclusive"))

Arguments

tsl

(required, list) Time series list. Default: NULL

names

(optional, character string) Three different sets of column names can be requested:

  • "all" (default): list with the column names in each zoo object in tsl. Unnamed columns are tagged with the string "unnamed".

  • "shared": character vector with the shared column names in at least two zoo objects in tsl.

  • "exclusive": list with names of exclusive columns (if any) in each zoo object in tsl.

Value

list

See Also

Other tsl_management: tsl_burst(), tsl_colnames_clean(), tsl_colnames_prefix(), tsl_colnames_set(), tsl_colnames_suffix(), tsl_count_NA(), tsl_diagnose(), tsl_handle_NA(), tsl_join(), 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()

Examples

#generate example data
tsl <- tsl_simulate()

#list all column names
tsl_colnames_get(
  tsl = tsl,
  names = "all"
)

#change one column name
names(tsl[[1]])[1] <- "new_column"

#all names again
tsl_colnames_get(
  tsl = tsl,
  names = "all"
)

#shared column names
tsl_colnames_get(
  tsl = tsl,
  names = "shared"
)

#exclusive column names
tsl_colnames_get(
  tsl = tsl,
  names = "exclusive"
)

distantia documentation built on April 4, 2025, 5:42 a.m.