toomany: Looks if a value is repeated too many times

Description Usage Arguments Value Examples

View source: R/toomany.R

Description

This function splits data by month and looks if a value is repeated too many times

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#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)

INQC documentation built on May 24, 2021, 5:07 p.m.