Skip to contents

Append Prefix to Column Names of Time Series List

Usage

tsl_colnames_prefix(tsl = NULL, prefix = NULL)

Arguments

tsl

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

prefix

(optional, character string) String to prepend to the column names. Default: NULL.

Value

time series list

Examples

tsl <- tsl_simulate()

tsl_colnames_get(tsl = tsl)
#> $A
#> [1] "a" "b" "c" "d" "e"
#> 
#> $B
#> [1] "a" "b" "c" "d" "e"
#> 

tsl <- tsl_colnames_prefix(
  tsl = tsl,
  prefix = "my_prefix_"
)

tsl_colnames_get(tsl = tsl)
#> $A
#> [1] "my_prefix_a" "my_prefix_b" "my_prefix_c" "my_prefix_d" "my_prefix_e"
#> 
#> $B
#> [1] "my_prefix_a" "my_prefix_b" "my_prefix_c" "my_prefix_d" "my_prefix_e"
#>