toomany {INQC} | R Documentation |
Looks if a value is repeated too many times
Description
This function splits data by month and looks if a value is repeated too many times
Usage
toomany(y, blockmany = 15, scope = 1, exclude = NULL)
Arguments
y |
two columns with date and data |
blockmany |
maximum number of repeated values in a month, year, or season |
scope |
monthly (1), annual (2) |
exclude |
values to exclude, e.g. if precipitation, 0 must be excluded |
Value
list of positions which do not pass this QC test. If all positions pass the test, returns NULL
Examples
#Extract the ECA&D data file (maximum air temperature) from the example data folder
path2inptfl<-system.file("extdata", "TX_SOUID132734.txt", package = "INQC")
#Read the data file
y<-readecad(input=path2inptfl,missing= -9999)[,3:4]
#Introduce the errors in first 20 data values
y[1:20,2]<-30
#Find all suspicious positions in the time series
toomany(y,blockmany=15,scope=1,exclude=NULL)
#Extract the ECA&D data file (atmospheric precipitation) from the example data folder
path2inptfl<-system.file("extdata", "RR_SOUID132730.txt", package = "INQC")
#Read the data file
y<-readecad(input=path2inptfl,missing= -9999)[,3:4]
#Introduce the errors in first 20 data values
y[1:20,2]<-10
#Find all suspicious positions in the time series
toomany(y,blockmany=15,scope=1,exclude=0)
[Package INQC version 2.0.5 Index]