tisFilter: Linear Filtering on a Time Series

Description Usage Arguments Value Note See Also Examples

View source: R/filter.tis.R

Description

Applies linear filtering to a univariate tis series or to each column separately of a multivariate tis series.

Usage

1

Arguments

x

a univariate or multivariate time series.

...

arguments passed along to filter.

Value

A tis time indexed series with leading and trailing NA values stripped.

Note

If ever the filter() function is made generic, as it should be, this function could become the tis method for it.

See Also

filter

Examples

1
2
3
4
x <- tis(1:100, start = c(2000,1), freq = 12)
tisFilter(x, rep(1, 3))
tisFilter(x, rep(1, 3), sides = 1)
tisFilter(x, rep(1, 3), sides = 1, circular = TRUE)

Example output

     Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000       6   9  12  15  18  21  24  27  30  33  36
2001  39  42  45  48  51  54  57  60  63  66  69  72
2002  75  78  81  84  87  90  93  96  99 102 105 108
2003 111 114 117 120 123 126 129 132 135 138 141 144
2004 147 150 153 156 159 162 165 168 171 174 177 180
2005 183 186 189 192 195 198 201 204 207 210 213 216
2006 219 222 225 228 231 234 237 240 243 246 249 252
2007 255 258 261 264 267 270 273 276 279 282 285 288
2008 291 294 297                                    
class: tis
     Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000           6   9  12  15  18  21  24  27  30  33
2001  36  39  42  45  48  51  54  57  60  63  66  69
2002  72  75  78  81  84  87  90  93  96  99 102 105
2003 108 111 114 117 120 123 126 129 132 135 138 141
2004 144 147 150 153 156 159 162 165 168 171 174 177
2005 180 183 186 189 192 195 198 201 204 207 210 213
2006 216 219 222 225 228 231 234 237 240 243 246 249
2007 252 255 258 261 264 267 270 273 276 279 282 285
2008 288 291 294 297                                
class: tis
     Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000 200 103   6   9  12  15  18  21  24  27  30  33
2001  36  39  42  45  48  51  54  57  60  63  66  69
2002  72  75  78  81  84  87  90  93  96  99 102 105
2003 108 111 114 117 120 123 126 129 132 135 138 141
2004 144 147 150 153 156 159 162 165 168 171 174 177
2005 180 183 186 189 192 195 198 201 204 207 210 213
2006 216 219 222 225 228 231 234 237 240 243 246 249
2007 252 255 258 261 264 267 270 273 276 279 282 285
2008 288 291 294 297                                
class: tis

tis documentation built on Sept. 29, 2021, 1:06 a.m.