IsPermanentGap: Identify if a gap in a time series occurs permanently

Description Usage Arguments Author(s) See Also Examples

Description

The function identifies obervations in time series as permanent gaps if the gap occurs during the same period in several years.

Usage

1
2
IsPermanentGap(Yt, min.gapfrac = 0.2, 
    lower = TRUE, ...)

Arguments

Yt

univariate time series of class ts

min.gapfrac

How often has an observation to be NA to be considered as a permanent gap? (fraction of time series length) Example: If the month January is 5 times NA in a 10 year time series (= 0.5), then the month January is considered as permanent gap if min.gapfrac = 0.4.

lower

identify lower gaps (TRUE), upper gaps (FALSE) or lower and upper gaps (NULL)

...

further arguments (currently not used)

Author(s)

Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]

See Also

TsPP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# introduce some systematic gaps in january, february, december and july
gaps <- ndvi
winter <- cycle(ndvi) == 1 | cycle(ndvi) == 2 | cycle(ndvi) == 12 | cycle(ndvi) == 7
gaps[winter] <- NA
gaps[1] <- 0.2
gaps[7] <- 0.3
plot(gaps)

# identifiy permanent winter gaps only
IsPermanentGap(gaps, lower=TRUE)

# identify permanent summer gaps
IsPermanentGap(gaps, lower=FALSE)

# identify all permanent gaps
IsPermanentGap(gaps, lower=NULL)

greenbrown documentation built on Dec. 18, 2020, 3:02 p.m.