Description Usage Arguments Details Value Author(s) References See Also Examples
Build a KDD (Key Day Dataset) object from a matrix or a data frame containing a time series and other attributes.
1 2 | kdd.from.raw.data(raw.data, keyday.threshold, nb.days, col.series, col.date,
na.rm = TRUE, filter = NULL)
|
raw.data |
a data frame or a matrix containing raw data. |
keyday.threshold |
a numeric providing the threshold value above which a day is considered as a key day (i.e. if the value y_i of the times series is greater than or equal to |
nb.days |
an integer specifying the number of days considered after and before each key day. |
col.series |
an integer specifying the number of the column containing the time series. |
col.date |
an integer vector of size three specifying the numbers of the columns containing the vector of years, the vector of months and the vector of days in numeric format. |
na.rm |
a logical indicating whether key days i with missing values in the sub-series y_{i-K},…,y_{i+K} have to be discarded. If |
filter |
a list of lists specifying the filters to carry out over the time series (default is |
The filter
argument is a list of lists, each list having the following arguments:
apply.over
:a character string that must be one of "keyday" or "range", and that indicates whether the filter concerns only the key days or also the range of days considered around the key days (K days before and K days after each key day).
column
:an integer specifying the column of raw.data
which the filter is applied to.
value
:a value that must be taken by the variable determined by the argument column
.
Let i denote a key day. Let z_i denote the value, at day i, of the variable determined by the argument column
. If apply.over = "keyday"
and z_i = value
, then key day i is kept, otherwise it is discarded. If apply.over = "range"
and z_j = value
for all j\in\{i-K,…,i+K\}, then key day i is kept, otherwise it is discarded.
an object from the KDD class.
Samuel Soubeyrand Samuel.Soubeyrand@avignon.inra.fr, Cindy E. Morris, E. Keith Bigg.
Soubeyrand, S., Morris, C. E. and Bigg, E. K. (2014). Analysis of fragmented time directionality in time series to elucidate feedbacks in climate data. Environmental Modelling and Software 61: 78-86.
KDD, kdd, rain.site.6008
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #### load data for site 6008 (Callagiddy station)
data(rain.site.6008)
#### build KDD objects from raw data (site 6008: Callagiddy station)
## using a threshold value equal to 25
KDD=kdd.from.raw.data(raw.data=rain.site.6008,keyday.threshold=25,nb.days=20,
col.series=5,col.date=c(2,3,4),na.rm=TRUE,filter=NULL)
summary(KDD)
#### build KDD objects from raw data (site 6008: Callagiddy station)
## using a threshold value equal to 25
## using filters
rain.site.6008b=cbind(rain.site.6008,rain.site.6008[["Year"]]>=1960)
KDD2=kdd.from.raw.data(raw.data=rain.site.6008b,keyday.threshold=25,nb.days=20,
col.series=5,col.date=c(2,3,4),na.rm=TRUE,
filter=list(list(apply.over="range",column=6,value=TRUE)))
summary(KDD2)
|
Loading required package: maps
Loading required package: mapdata
Loading required package: proj4
Loading required package: sp
Loading required package: geoR
--------------------------------------------------------------
Analysis of Geostatistical Data
For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
geoR version 1.7-5.2.1 (built on 2016-05-02) is now loaded
--------------------------------------------------------------
Warning message:
no DISPLAY variable so Tk is not available
Keyday data object:
Data period: 1910 - 2009
Keyday threshold: 25
Total number of keydays: 204
Mean and standard deviation of rainfalls at keydays: 40.7 and 16.33
Keyday data object:
Data period: 1960 - 2009
Keyday threshold: 25
Total number of keydays: 107
Mean and standard deviation of rainfalls at keydays: 39.61 and 15.33
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.