Description Usage Arguments Value Examples
This function detects consecutive equal values (e.g., 15.1, 15.1, 15.1, 15.1...) in a data time series. Also can be used to detect consecutive equal decimal part of the values (e.g., 15.1, 12.1, 13.1, 10.1 ...)
1 |
y |
data vector |
maxseq |
the maximum number of contiguous repetitions of a value (e.g., if 3, sequences of 4 will be flagged) |
exclude |
values to be excluded. This is useful for variables where a single value is expected to repeat many times, e.g. 0.0 in precipitation. |
list of positions which do not pass this QC test. If all positions pass the test, returns NULL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | y<-rnorm(100)
y[10:20]<-10
flat(y,5)
#Extract the ECA&D data file from the example data folder
path2inptfl<-system.file("extdata", "TX_SOUID132734.txt", package = "INQC")
#Read the data file
y<-readecad(input=path2inptfl,missing= -9999)[,4]
#Find all consecutive (with a length > 5 elements) equal values in the time series
flat(y,5)
#Introduce the duplicated dates
y[6:12]<-10
#Find all consecutive (with a length > 5 elements) equal values in the time series
flat(y,5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.