Filter a koma_ts object by attribute value
Usage
filter_by_attribute(x, attribute, value, var = NULL, ...)
# S3 method for class 'mts'
filter_by_attribute(x, attribute, value, var = NULL, ...)
# S3 method for class 'list'
filter_by_attribute(x, attribute, value, var = NULL, ...)Examples
x <- as_ets(
ts(1:8, start = c(2020, 1), frequency = 4),
series_type = "level",
method = "diff_log"
)
filter_by_attribute(
list(x = x),
attribute = "series_type",
value = "level"
)
#> $x
#> <koma_ts>
#> attributes:
#> series_type: chr "level"
#> method: chr "diff_log"
#>
#> series:
#> Qtr1 Qtr2 Qtr3 Qtr4
#> 2020 1 2 3 4
#> 2021 5 6 7 8
#>