summarize.gaps: Summarize Gaps in a Series

Description Usage Arguments Value See Also Examples

View source: R/gapfill.R

Description

Provide a summary about the gaps in a series given desired window length, namely whether the gap is internal or not, whether it is sparce or dense, etc.

Usage

1
2
3
4
5
6
7
8
## S3 method for class '1d.ssa'
summarize.gaps(x, L = NULL)
## S3 method for class 'toeplitz.ssa'
summarize.gaps(x, L = NULL)
## S3 method for class 'cssa'
summarize.gaps(x, L = NULL)
## Default S3 method:
summarize.gaps(x, L)

Arguments

x

SSA object

L

vector of window lengths, if missing or NULL, then all viable window lengths are considered

Value

Object of type 'ssa.gaps': a list with entries which correspond to every window length. For each window length, entry is a list of gaps with their descriptions.

See Also

Rssa for an overview of the package, as well as, gapfill, igapfill, clplot,

Examples

1
2
3
4
5
6
7
8
9
# Produce series with gaps
F <- co2; F[c(12, 100:200, 250)] <- NA
# Summarize the gaps
s <- ssa(F, L = 72)
g <- summarize.gaps(s, L = c(36, 72, 144))
# Print the results
print(g)
# Plot the proportion of complete lag-vectors
plot(g)

Example output

Loading required package: svd
Loading required package: forecast

Attaching package: 'Rssa'

The following object is masked from 'package:stats':

    decompose

Warning message:
In eval(.init.fragment(this)) :
  Some field elements were not covered by shaped window. 60 elements will be ommited

Call:
summarize.gaps.default(x = x$F, L = L)

Gaps summary:
L = 36 
  [12, 12], left, dense
  [100, 200], internal, dense
  [250, 250], internal, dense
L = 72 
  [12, 12], left, dense
  [100, 250], internal, sparse
L = 144 
  [12, 250], left, sparse

Rssa documentation built on May 29, 2017, 5:33 p.m.