Title: | Auxiliary Functions for Phenological Data Processing, Modelling and Result Handling |
---|---|
Description: | Provides functions for phenological data preprocessing, modelling and result handling. For more information, please refer to Lange et al. (2016) <doi:10.1007/s00484-016-1161-8>. |
Authors: | Maximilian Lange |
Maintainer: | Maximilian Lange <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.2-7 |
Built: | 2024-10-30 06:51:05 UTC |
Source: | CRAN |
This dataset gives an example of budburst observations from the German Weather Service (DWD)
obtainable by the plant phenological online database PPODB.
The dataset was extracted out of the downloadable tsv-File by use of data.read.phase
.
data(bbObs)
data(bbObs)
A dataframe containing three observations.
Plant Phenological Online Database (PPODB), http://www.phenology.de
Dierenbach, J., Badeck, F.W., Schaber, J., 2013. The plant phenological online database (PPODB): an online database for long-term phenological data. International Journal of Biometeorology , 1-8.
Adds a temperature vector to a dataset containing spatial and seasonal phenological information.
data.addTemperatures(dataset, grid.related.to.Temperatures, temperature.filenames, temperature.matrix, temperature.scale.factor, out2File=FALSE, silent=FALSE)
data.addTemperatures(dataset, grid.related.to.Temperatures, temperature.filenames, temperature.matrix, temperature.scale.factor, out2File=FALSE, silent=FALSE)
dataset |
A dataset containing spatial and seasonal phenological information. Can be created by using function |
grid.related.to.Temperatures |
A grid containing spatial informations for the temperature data. |
temperature.filenames |
The full name of temperature files. The filenames have to contain the year (YYYY) of the temperature observation. The files should be stored as RData-Files and have to contain a matrix called ‘edk.one.year’ with 366 columns (one per day) and the number of rows equal to the number of rows in ‘grid.related.to.Temperatures’. Should have the value NULL if a temperature matrix should be used instead. |
temperature.matrix |
An array containing temperature data. The year of the observation should given as rowname, the columns should equal the julian day of the observation and the third dimension of the array should equal the location given in ‘grid.related.to.Temperatures’ |
. The matrix will be used instead of temperature files if ‘temperature.filenames’ is NULL.
temperature.scale.factor |
The down-scaling factor for the temperature data (needed if the data is scaled). |
out2File |
A boolean value determining wether the output will be stored in log-files. |
silent |
A boolean value determining wether the function should generate output messages or not. |
Adds a temperature vector to a dataset containing spatial (The coordinates of the station as Gauss-Krueger coordinates) and seasonal (The year for which the budburst day should be modelled and the leafcolouring day of the previous year) phenological information.
A dataset containing spatial and seasonal phenological data and the added temperatures.
Daniel Doktor, Maximilian Lange
data.loadTemperature
,data.extract
,relatedGrid
,temperatures
## load extracted observations as created by 'data.extract' data(extractedObs) ## load temperature data data(temperatures) ## load grid with spatial informations for temperature files data(relatedGrid) ## add temperatures from files in working directory dataset <- data.addTemperatures(dataset=extractedObs, out2File=FALSE, grid.related.to.Temperatures=relatedGrid, temperature.filenames=NULL, temperature.matrix=temperatures, temperature.scale.factor=0.1) ## resulting dataset should equal 'dataFinal' data(dataFinal) dataFinal dataset
## load extracted observations as created by 'data.extract' data(extractedObs) ## load temperature data data(temperatures) ## load grid with spatial informations for temperature files data(relatedGrid) ## add temperatures from files in working directory dataset <- data.addTemperatures(dataset=extractedObs, out2File=FALSE, grid.related.to.Temperatures=relatedGrid, temperature.filenames=NULL, temperature.matrix=temperatures, temperature.scale.factor=0.1) ## resulting dataset should equal 'dataFinal' data(dataFinal) dataFinal dataset
This function creates a station net and builds clusters of stations out of it. These clusters are used to create combined timeseries.
data.combine(dataset, range=5000, alt.range=50, shuffle=TRUE, tries=100, silent=FALSE, out2File=FALSE, clusters.tmp.file="tmpcluster.RData")
data.combine(dataset, range=5000, alt.range=50, shuffle=TRUE, tries=100, silent=FALSE, out2File=FALSE, clusters.tmp.file="tmpcluster.RData")
dataset |
A dataset created by |
range |
The maximum distance between two stations that should be connected in the station net. |
alt.range |
The maximum altitude difference between two stations that should be connected in the station net. |
shuffle |
A boolean value determining wether the stations should be processed in their order (value: FALSE) or if they should be shuffled befor processing (value: TRUE). Shuffled stations produce different results each run. |
tries |
If value of ‘shuffle’ is true, the integer value ‘tries’ determines how much cluster-lists should be created. The cluster-list with the lowest number of entries will be returned (this will increase the size of the clusters). |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
clusters.tmp.file |
A file where the clusters are saved for evaluation. If the value is NULL, no file will be created. |
This function joins the functions data.combine.stationNet
, data.combine.clusters
and data.combine.timeseries
.
A dataset containing the combined timeseries as a data.frame with same columns like a data.frame created by data.extract
.
Daniel Doktor, Maximilian Lange
Schaber J., Badeck F. (2002). Evaluation of methods for the combination of phenological time series and outlier detection. Tree Physiology, 22:973-982
data.combine.clusters
,data.combine.stationNet
,data.combine.timeseries
## load extracted observations as created by 'data.extract' data(extractedObs) ## combine timeseries data.combined <- data.combine(dataset=extractedObs, range=5000, alt.range=50, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE, clusters.tmp.file=NULL)
## load extracted observations as created by 'data.extract' data(extractedObs) ## combine timeseries data.combined <- data.combine(dataset=extractedObs, range=5000, alt.range=50, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE, clusters.tmp.file=NULL)
Creates a list of station clusters.
data.combine.clusters(dataset, stations.net, shuffle=TRUE, tries=100, silent=FALSE, out2File=FALSE)
data.combine.clusters(dataset, stations.net, shuffle=TRUE, tries=100, silent=FALSE, out2File=FALSE)
dataset |
The dataset with the stations to cluster and their coordinates. |
stations.net |
A list containing the information which stations are neighbours.
Created by function |
shuffle |
A boolean value determining wether the stations should be processed in their order (value: FALSE) or if they should be shuffled befor processing (value: TRUE). Shuffled stations produce different results each run. |
tries |
If value of ‘shuffle’ is true, the integer value ‘tries’ determines how much cluster-lists should be created. The cluster-list with the lowest number of entries will be returned (this will increase the size of the clusters). |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
Creates a list of station clusters by randomly creating clusters (if value of ‘shuffle’ is TRUE) and chosing the list with the lowest number of clusters.
Returns a list of station clusters (a station cluster is a vector containing related stations).
Daniel Doktor, Maximilian Lange
data.combine.clusters.search
,data.combine.stationNet
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net clusters <- data.combine.clusters(extractedObs, stations.net, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE)
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net clusters <- data.combine.clusters(extractedObs, stations.net, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE)
Searches clusters in a station net.
data.combine.clusters.search(stations, stations.net, shuffle=TRUE)
data.combine.clusters.search(stations, stations.net, shuffle=TRUE)
stations |
A list of all stations. |
stations.net |
A list of neighbourstations (neighbours of the station at same list position in list ‘stations’). |
shuffle |
A boolean value determining wether the stations should be processed in their order (value: FALSE) or if they should be shuffled befor processing (value: TRUE). |
Searches related stations in a station net. If value of ‘shuffle’ is TRUE, each run of this method produces different results.
Returns a list containing related stations.
Daniel Doktor, Maximilian Lange
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net stations <- as.list(unique(extractedObs$STAT_ID)) clusters <- data.combine.clusters.search(stations, stations.net, shuffle=TRUE)
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net stations <- as.list(unique(extractedObs$STAT_ID)) clusters <- data.combine.clusters.search(stations, stations.net, shuffle=TRUE)
Creates a net of the stations of dataset by checking the distances between the stations.
data.combine.stationNet(dataset, range, alt.range, silent=FALSE, out2File=FALSE)
data.combine.stationNet(dataset, range, alt.range, silent=FALSE, out2File=FALSE)
dataset |
A dataset created by |
range |
The maximum distance between two stations that should be connected in the net. |
alt.range |
The maximum altitude difference between two stations that should be connected in the net. |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
Only stations with a maximal distance of 'range' and maximal altitude difference of ‘alt.range’ are connected.
Returns a list with entries for all stations of dataset. Each list entry stands for a station and contains all neighbours of that station.
Daniel Doktor, Maximilian Lange
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE)
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE)
Creates combined timeseries out of the dataset by using clusters of stations.
data.combine.timeseries(dataset, clusters, silent=FALSE, out2File=FALSE, minimalClusterSize=5)
data.combine.timeseries(dataset, clusters, silent=FALSE, out2File=FALSE, minimalClusterSize=5)
dataset |
A dataset created by |
clusters |
A list of station clusters generated by |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
minimalClusterSize |
An integer value determining the minimal number of stations in a cluster to be included in combining process. |
The combined timeseries are created by using the function pheno.lad.fit
of package ‘pheno’. This process eliminates outliers and smooths the data.
A dataset containing the combined timeseries as a data.frame with same columns like a data.frame created by data.extract
.
Daniel Doktor, Maximilian Lange
Schaber J., Badeck F. (2002). Evaluation of methods for the combination of phenological time series and outlier detection. Tree Physiology, 22:973-982
pheno.lad.fit
, data.extract
,
data.combine.stationNet
, data.combine.clusters
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net clusters <- data.combine.clusters(extractedObs, stations.net, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE) ## combine timeseries data.combined <- data.combine.timeseries(extractedObs, clusters, out2File=FALSE)
## load extracted observations as created by 'data.extract' data(extractedObs) ## create station net stations.net <- data.combine.stationNet(extractedObs, range=5000, alt.range=50, silent=FALSE, out2File=FALSE) ## search clusters in station net clusters <- data.combine.clusters(extractedObs, stations.net, shuffle=TRUE, tries=3, silent=FALSE, out2File=FALSE) ## combine timeseries data.combined <- data.combine.timeseries(extractedObs, clusters, out2File=FALSE)
Searches the number of the cell of a given spatial grid by given coordinates (Gauss-Krueger-Coordinates).
data.coordinates2gridcellnumber(grid, x,y)
data.coordinates2gridcellnumber(grid, x,y)
grid |
The grid in which the cell should be searched. |
x |
The ‘Rechtswert’ of the Gauss-Krueger-Coordinates. |
y |
The ‘Hochwert’ of the Gauss-Krueger-Coordinates. |
Searches the number of the cell of a given spatial grid by given coordinates (Gauss-Krueger-Coordinates).
Returns the cell-number of the grid-cell which is next to the given coordinates.
Daniel Doktor, Maximilian Lange
## load grid containing spatial information data(relatedGrid) ## search position in grid xy <- util.geoco2gk(54.12,10.17,4) gridposition <- data.coordinates2gridcellnumber(grid=relatedGrid, x=xy[,1],y=xy[,2]) gridposition
## load grid containing spatial information data(relatedGrid) ## search position in grid xy <- util.geoco2gk(54.12,10.17,4) gridposition <- data.coordinates2gridcellnumber(grid=relatedGrid, x=xy[,1],y=xy[,2]) gridposition
Extracts the essential data out of budburst and leafcolouring data and combines them.
data.extract(data.budburst, data.leafcolouring, valid.years=1952:2009, out2File=FALSE, silent=FALSE)
data.extract(data.budburst, data.leafcolouring, valid.years=1952:2009, out2File=FALSE, silent=FALSE)
data.budburst |
A dataset extracted by function |
data.leafcolouring |
A dataset extracted by function |
valid.years |
The years that should be included in extraction process (may be needed if some data in datasets are insufficient). |
out2File |
A boolean value determining wether the output will be stored in log-files. |
silent |
A boolean value determining wether the function should generate output messages or not. |
This function extracts the essential data out of budburst and leafcolouring data and combines them. Therefor it extracts the stations contained in both datasets and searches the leafcolouring dates and the related budburst date (at the following year).
A dataset containing the station ID, the station geographic and the Gauss-Krueger-coordinates of the station, the altitude of the station, the year and the julian day of the budburst and the leafcolouring and outlier information for budburst and leafcolouring.
Daniel Doktor, Maximilian Lange
data.read.phase
,lcObs
,bbObs
,extractedObs
## load budburst observations (extracted via 'data.read.phase') data(bbObs) ## load leafcolouring observations (extracted via 'data.read.phase') data(lcObs) ## extract essential data data.extracted <- data.extract(data.budburst=bbObs, data.leafcolouring=lcObs, out2File=FALSE)
## load budburst observations (extracted via 'data.read.phase') data(bbObs) ## load leafcolouring observations (extracted via 'data.read.phase') data(lcObs) ## extract essential data data.extracted <- data.extract(data.budburst=bbObs, data.leafcolouring=lcObs, out2File=FALSE)
Loads a temperature vector of given length from a given day of a given year.
data.loadTemperature(year, temperature.year, temperature.previous.year, from.previous.year.doy, length, position, scale.factor=0.1)
data.loadTemperature(year, temperature.year, temperature.previous.year, from.previous.year.doy, length, position, scale.factor=0.1)
year |
The year of the budburst doy which should be calculated. |
temperature.year |
A vector of temperature data (with length 365 or 366) of year given by ‘year’. |
temperature.previous.year |
A vector of temperature data (with length 365 or 366) of previous year. |
from.previous.year.doy |
The day the modelling starts (leafcolouring day of previous year). |
length |
The length of the resulting temperature vector. |
position |
The number of the grid-cell for which the temperatures should be loaded. |
scale.factor |
The down-scaling factor for the temperature data (needed if the data is scaled). |
Loads a temperature vector of given length from temperature data. The day of leafcolouring of the
previous year should be given as starting day. The vector contains one temperature datapoint per day and
should have a length of 300 or more to ensure a stable modelling process. Internal function used by method data.addTemperatures
.
A vector with temperature data for a given location and a given period.
Daniel Doktor, Maximilian Lange
data.addTemperatures
,data.coordinates2gridcellnumber
t.year <- as.matrix(rnorm(365, mean=10, sd=5)) t.p.year <- as.matrix(rnorm(365, mean=9, sd=6)) temperatures <- data.loadTemperature(year=2006,temperature.year=t.year, temperature.previous.year=t.p.year, from.previous.year.doy=210, length=365, position=1, scale.factor=0.1)
t.year <- as.matrix(rnorm(365, mean=10, sd=5)) t.p.year <- as.matrix(rnorm(365, mean=9, sd=6)) temperatures <- data.loadTemperature(year=2006,temperature.year=t.year, temperature.previous.year=t.p.year, from.previous.year.doy=210, length=365, position=1, scale.factor=0.1)
This function extracts data from tsv-Files, creates combined timeseries out of them if needed and adds temperature data.
data.main(extraction.done=TRUE, out2File=FALSE, grid.related.to.temperaturefiles, valid.years=1952:2009, combine.time.series=TRUE, range=10000, alt.range=50, temperature.scale.factor=1, dataPath=getwd(),temperature.filenames, temperature.matrix, pathForTmpFiles=getwd(), pathToSave=getwd(), plant="beech")
data.main(extraction.done=TRUE, out2File=FALSE, grid.related.to.temperaturefiles, valid.years=1952:2009, combine.time.series=TRUE, range=10000, alt.range=50, temperature.scale.factor=1, dataPath=getwd(),temperature.filenames, temperature.matrix, pathForTmpFiles=getwd(), pathToSave=getwd(), plant="beech")
extraction.done |
If data extraction was already done, turn this value to TRUE and the extracted values will be loaded from ‘pathForTmpFiles’. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
grid.related.to.temperaturefiles |
A grid containing spatial informations for the temperature files. |
valid.years |
The years that should be included in extraction process (may be needed if some data in datasets are insufficient). |
combine.time.series |
A boolean value determining wether the extracted timeseries should be combined or not. |
range |
The maximum distance between two stations that should be connected in the station station-net needed for the timeserie-combination. |
alt.range |
The maximum altitude difference between two stations that should be connected in the station-net needed for the timeserie-combination. |
temperature.scale.factor |
The down-scaling factor for the temperature data (needed if the data is scaled). |
dataPath |
The path where the tsv-tables are stored. These tsv-tables should have the following name: ‘<PLANT>_budburst.tsv’ for budburst-data or ‘<PLANT>_leafcolouring.tsv’ for leafcolouring-data, where <PLANT> stands for the name of the plant, for example ‘beech’. |
temperature.filenames |
The full name of temperature files. The filenames have to contain the year (YYYY) of the temperature observation. The files should be stored as RData-Files and have to contain a matrix called ‘edk.one.year’ with 366 columns (one per day) and the number of rows equal to the number of rows in ‘grid.related.to.Temperatures’. Should have the value NULL if a temperature matrix should be used instead. |
temperature.matrix |
An array containing temperature data. The year of the observation should given as rowname, the columns should equal the julian day of the observation and the third dimension of the array should equal the location given in ‘grid.related.to.Temperatures’ |
. The matrix will be used instead of temperature files if ‘temperature.filenames’ is NULL.
pathForTmpFiles |
The path where the extracted data should be temporarily stored as RData-files. |
pathToSave |
The path where the resulting dataframe should be stored as RData-file with the name ‘<PLANT>-dataset.RData’ for non-combined data or ‘<PLANT>-dataset-cts.RData’ for combined data. |
plant |
The name of the plant which should be processed. |
This function is the main method for data extraction. It exctracts budburst and leafcolouring data from tsv-Files, creates combined timeseries out of them if needed and adds temperature data from RData files containing daily mean temperatures.
Returns nothing, but saves the resulting dataset in ‘pathToSave’.
Daniel Doktor, Maximilian Lange
data.extract
,data.combine
,data.addTemperatures
## load temperature data data(temperatures) ## load grid with spatial informations for temperature files data(relatedGrid) ## extract dataset from datafiles in working directory ## Not run: dataset <- data.main(extraction.done=FALSE, out2File=FALSE, grid.related.to.temperaturefiles=relatedGrid, combine.timeseries=TRUE, range=5000, alt.range=50, temperature.scale.factor=0.1, dataPath=getwd(), temperature.filenames=NULL, temperature.matrix=temperatures, pathForTmpFiles=getwd(), pathToSave=getwd(), plant="beech") ## End(Not run)
## load temperature data data(temperatures) ## load grid with spatial informations for temperature files data(relatedGrid) ## extract dataset from datafiles in working directory ## Not run: dataset <- data.main(extraction.done=FALSE, out2File=FALSE, grid.related.to.temperaturefiles=relatedGrid, combine.timeseries=TRUE, range=5000, alt.range=50, temperature.scale.factor=0.1, dataPath=getwd(), temperature.filenames=NULL, temperature.matrix=temperatures, pathForTmpFiles=getwd(), pathToSave=getwd(), plant="beech") ## End(Not run)
This function reads phenological data out of a tsv-table.
data.read.phase(path, filename)
data.read.phase(path, filename)
path |
The path of the tsv-file to read. |
filename |
The filename of the tsv-table. |
Reads phenological data out of a tsv-table containing the columns ‘DWD_STAT_ID’ (the ID of the phenological station), ‘STAT_NAME’ (the name of the phenological station), ‘STAT_LON’ (the longitude of the station), ‘STAT_LAT’ (the latitude of the station), ‘STAT_ALT’ (the altitude of the station), ‘BEGIN_OBS’ (the year the station started the observation), ‘END_OBS’ (the year the station stopped the observation), ‘NATURRAUM_ID’ (the id of the region), ‘PHASE_ID’ (the ID of the observed phase), ‘OBS_DAY’ (the julian day the observed phase starts), ‘OBS_YEAR’ (the year at which ‘OBS_DAY’ was observed), ‘CHECKED’ (a value determining wether the result was checked or not), ‘outlier’ (if result was checked, this value determines wether it was an outlier or not). Such a dataset can be obtained at http://www.phenology.de.
Returns the table as R-Dataframe.
Daniel Doktor, Maximilian Lange
Dierenbach, J., Badeck, F.W., Schaber, J., 2013. The plant phenological online database (PPODB): an online database for long-term phenological data. International Journal of Biometeorology , 1-8.
##read file 'beech_budburst.tsv' out of working directory ## Not run: data.budburst <- data.read.phase(path=getwd(), filename="beech_budburst.tsv") ## End(Not run) ## resulting data looks like the following: data(lcObs) data(bbObs) lcObs bbObs
##read file 'beech_budburst.tsv' out of working directory ## Not run: data.budburst <- data.read.phase(path=getwd(), filename="beech_budburst.tsv") ## End(Not run) ## resulting data looks like the following: data(lcObs) data(bbObs) lcObs bbObs
This dataset contains phenological data (connected leafcolouring and budburst observations) as well as
spatially related temperature data. The dataset was created out of extractedObs
, relatedGrid
and
temperatures
by use of data.addTemperatures
.
data(dataFinal)
data(dataFinal)
A dataframe containing three rows of connected phenological information combined with temperature data.
data.addTemperatures
,bbObs
,lcObs
,extractedObs
,relatedGrid
,temperatures
This dataset gives an example of leafcolouring observations connected with subsequent budburst observations.
The observations are extracted out of phenological data from the German Weather Service (DWD) obtainable by
the plant phenological online database PPODB.
The dataset was created out of the datasets bbObs
and lcObs
by use of method data.extract
.
data(extractedObs)
data(extractedObs)
A dataframe containing three rows of connected observations.
Plant Phenological Online Database (PPODB), http://www.phenology.de
Dierenbach, J., Badeck, F.W., Schaber, J., 2013. The plant phenological online database (PPODB): an online database for long-term phenological data. International Journal of Biometeorology , 1-8.
This dataset gives an example of leafcolouring observations from the German Weather Service (DWD) obtainable
by the plant phenological online database PPODB.
The dataset was extracted out of the downloadable tsv-File by use of data.read.phase
.
data(lcObs)
data(lcObs)
A dataframe containing three observations.
Plant Phenological Online Database (PPODB), http://www.phenology.de
Dierenbach, J., Badeck, F.W., Schaber, J., 2013. The plant phenological online database (PPODB): an online database for long-term phenological data. International Journal of Biometeorology , 1-8.
Applies a promoter-inhibitor-model to a given dataset.
pim.solve(params, data, model.no=1, silent=FALSE, out2File=FALSE)
pim.solve(params, data, model.no=1, silent=FALSE, out2File=FALSE)
params |
The parameters for the promoter-inhibitor-model as list or vector with following order: a1, a2, a3, a4, T.min.i, T.opt.i, T.max.i, T.min.p, T.opt.p, T.max.p |
data |
A dataset containing the station ID, the station geographic and the Gauss-Krueger-coordinates of the station,
the altitude of the station, the year and the julian day of the budburst and the leafcolouring,
outlier information for budburst and leafcolouring and temperature data for modelling. Can be created by using the function |
model.no |
The promoter-inhibitor-model to use. See references for more details. |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
Applies a promoter-inhibitor-model with given parameters to a given dataset.
A dataset containing the values of the origin dataset and additionally the modelled budburst days.
Daniel Doktor, Maximilian Lange
Schaber, J. and Badeck, F.-W. (2003). Physiology-based phenology models for forest tree species in Germany . International Journal of Biometeorology 47:193-201
## load preprocessed data data(dataFinal) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE)
## load preprocessed data data(dataFinal) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE)
Interpolates result values with given spatial information.
result.extract.interpolate(mask.grid, values, alt, x, y)
result.extract.interpolate(mask.grid, values, alt, x, y)
mask.grid |
The grid with spatial information the values are ordered by. |
values |
The values which should be interpolated. |
alt |
The related altitude for the gridcells of ‘mask.grid’. |
x |
The related Rechtswert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’. |
y |
The related Hochwert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’. |
Interpolates result values with given spatial information by external drift kriging.
A vector with the interpolated values.
Daniel Doktor, Maximilian Lange
Krige, D.G., 1951. A statistical approach to some basic mine valuation problems on the witwatersrand. Journal of the Chemical, Metallurgical and Mining Society of South Africa 52, 119-139. Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences 30, 683-691.
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values ## interpolate result values with spatial informations of mask.grid values.model <- result.extract.interpolate(mask.grid=mask.grid, values=values.model, alt=mask.grid$alt, x=mask.grid$x, y=mask.grid$y)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values ## interpolate result values with spatial informations of mask.grid values.model <- result.extract.interpolate(mask.grid=mask.grid, values=values.model, alt=mask.grid$alt, x=mask.grid$x, y=mask.grid$y)
Extracts essential results from model.
result.extract.main(mask.grid, result.grid, model="pim", interpolate=TRUE, silent=FALSE, withOutliers=FALSE)
result.extract.main(mask.grid, result.grid, model="pim", interpolate=TRUE, silent=FALSE, withOutliers=FALSE)
mask.grid |
A grid containing spatial information related to values (which should be extracted) and their Gauss-Krueger-Coordinates. The values in the resulting data.frame will be ordered related to values in mask.grid. |
result.grid |
The grid created by |
model |
A character value determining which model was used to create the results (either ‘pim’ or ‘tsm’). |
interpolate |
A boolean value determining wether the results should be interpolated (with spatial information of mask.grid) or not. |
silent |
A boolean value determining wether the function should generate output messages or not. |
withOutliers |
A boolean value determining wether outliers should be included in extraction and transformation or not. |
Extracts essential results (observed and modelled results and their difference and coordinates) from used model.
A data.frame containing the modelled values (‘doy.model’), the observed values (‘doy.observed’), their difference (‘doy.dif’) and related coordinates (‘x’,‘y’)
Daniel Doktor, Maximilian Lange
result.extract.sub
,result.extract.mask
,result.extract.interpolate
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE)
Masks values with the spatial informations of a given grid.
result.extract.mask(mask.grid, values)
result.extract.mask(mask.grid, values)
mask.grid |
The grid with the spatial informations which should be used for masking. |
values |
The values to mask (in same order as ‘mask.grid’). |
Masks values with the spatial informations of a given grid. Gridcells with NA value are masked in the resulting data.frame by setting them to ‘-9999’.
A vector of masked values.
Daniel Doktor, Maximilian Lange
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values ## mask result values with spatial informations of mask.grid values.model <- result.extract.mask(relatedGrid, values.model)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values ## mask result values with spatial informations of mask.grid values.model <- result.extract.mask(relatedGrid, values.model)
Extracts and transformates given values to a data.frame with same order as a given masking grid.
result.extract.sub(mask.grid, values, gk4.x, gk4.y, outliers, silent=FALSE, withOutliers=FALSE)
result.extract.sub(mask.grid, values, gk4.x, gk4.y, outliers, silent=FALSE, withOutliers=FALSE)
mask.grid |
A grid containing spatial information related to the values and their Gauss-Krueger-Coordinates. The values in the resulting data.frame will be ordered related to values in ‘mask.grid’. |
values |
The values that should be extracted and transformed. |
gk4.x |
Gauss-Krueger-Rechtswert related to values. |
gk4.y |
Gauss-Krueger-Hochwert related to values. |
outliers |
Outlier information related to values. |
silent |
A boolean value determining wether the function should generate output messages or not. |
withOutliers |
A boolean value determining wether outliers should be included in extraction and transformation or not. |
Extracts and transformates given values (with related Gauss-Krueger-Coordinates) to a data.frame with same order as a given masking grid.
A grid containing the values and their coordinates (as given in ‘mask.grid’).
Daniel Doktor, Maximilian Lange
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## resolve outlier information outliers <- result$outlier.bb + result$outlier.lc outliers.na <- which(is.na(outliers)==TRUE) outliers[outliers.na] <- rep(0, length(outliers.na)) mask.grid <- relatedGrid ## extract valid modelled values values.model <- result.extract.sub(mask.grid=mask.grid, result$doy.bb.pim, result$gk4.x, result$gk4.y, outliers=outliers, silent=FALSE, withOutliers=FALSE)$values
Main function for result evaluation.
result.main(mask.grid, result.grid, plant="beech", model="pim", year=1954, picPath=getwd(), picName="beech-budburst", createFiles=TRUE, rsquarePath=getwd(), rsquareFile="rsquare.RData", rsquare.type="cod", silent=FALSE, withOutliers=FALSE)
result.main(mask.grid, result.grid, plant="beech", model="pim", year=1954, picPath=getwd(), picName="beech-budburst", createFiles=TRUE, rsquarePath=getwd(), rsquareFile="rsquare.RData", rsquare.type="cod", silent=FALSE, withOutliers=FALSE)
mask.grid |
A grid with spatial information related to the resulting grid of modelling. |
result.grid |
The resulting grid of modelling. Can be obtained by using |
plant |
The plant name for which the values of 'result.grid' are modelled. |
model |
A character value determining which model was used to create the results (either ‘pim’ or ‘tsm’). |
year |
The processed year. |
picPath |
The path where the created png-files should be stored. |
picName |
The filename of the created png-files. |
createFiles |
A boolean flag determining wether the results should be stored in files or not. |
rsquarePath |
The path where the RData-file with the rsquare-dataset should be stored. |
rsquareFile |
The filename of the RData-file with the rsquare-dataset. |
rsquare.type |
The value of type (either ‘cod’ or ‘pearson’) determines whether the coefficient of determination or the squared pearson correlation coefficient is used as rsquare. |
silent |
A boolean value determining wether the function should generate output messages or not. |
withOutliers |
A boolean value determining wether outliers should be included in extraction and transformation or not. |
Main function for result evaluation. Extracts essential values from resulting grid, interpolates and masks values, creates histogramms, scatterplot and maps and calculates r-square.
Daniel Doktor, Maximilian Lange
result.extract.main
,result.extract.interpolate
,result.pic.histogramm
,result.pic.maps
,result.pic.scatterplot
,result.rsquare
,pim.solve
,tsm.solve
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## evaluate resuts result.main(mask.grid=relatedGrid, result.grid=result, plant="beech", model="pim", year="1952-2009", picPath=getwd(), picName="beech-budburst", createFiles=FALSE, rsquarePath=getwd(), rsquareFile="rsquare.RData", rsquare.type="cod", silent=FALSE, withOutliers=FALSE)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## evaluate resuts result.main(mask.grid=relatedGrid, result.grid=result, plant="beech", model="pim", year="1952-2009", picPath=getwd(), picName="beech-budburst", createFiles=FALSE, rsquarePath=getwd(), rsquareFile="rsquare.RData", rsquare.type="cod", silent=FALSE, withOutliers=FALSE)
Creates histogramms of results.
result.pic.histogramm(values, picPath=getwd(), picName="budburst-beech", silent=FALSE, createFile=TRUE)
result.pic.histogramm(values, picPath=getwd(), picName="budburst-beech", silent=FALSE, createFile=TRUE)
values |
The data.frame with result values (can be created with |
picPath |
The path where the png-files should be stored. |
picName |
The name of the created files with the histogramms. |
silent |
A boolean value determining wether the function should generate output messages or not. |
createFile |
A boolean value determining wether a png-File will be created or not. |
Creates histogramms of results (observed value, modelled value and difference of them).
Returns nothing but creates histogramms as png-files with given path and filename.
Daniel Doktor, Maximilian Lange
result.extract.main
,result.main
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE) ## create histogramm result.pic.histogramm(values=result.values, picPath=getwd(), picName="beech_budburst", silent=FALSE, createFile=FALSE)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE) ## create histogramm result.pic.histogramm(values=result.values, picPath=getwd(), picName="beech_budburst", silent=FALSE, createFile=FALSE)
Creates maps out of results.
result.pic.maps(values, picPath=getwd(), picName="beech-budburst", silent=FALSE, createFile=TRUE)
result.pic.maps(values, picPath=getwd(), picName="beech-budburst", silent=FALSE, createFile=TRUE)
values |
The data.frame with result values (can be created with |
picPath |
The path where the png-files should be stored. |
picName |
The name of the created files with the maps. |
silent |
A boolean value determining wether the function should generate output messages or not. |
createFile |
A boolean value determining wether a png-File will be created or not. |
Creates maps out of results.
Returns nothing but stores maps as png-files with given path and filename.
Daniel Doktor, Maximilian Lange
result.extract.main
,result.main
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=TRUE, silent=FALSE) ## not enough successfully calculated budbursts ## replace with examples result.values$doy.model <- round(rnorm(n=9,mean=100,sd=20)) result.values$doy.observed <- round(rnorm(n=9,mean=100,sd=20)) ## create maps result.pic.maps(values=result.values, picPath=getwd(), picName="beech_budburst", silent=FALSE, createFile=FALSE)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=TRUE, silent=FALSE) ## not enough successfully calculated budbursts ## replace with examples result.values$doy.model <- round(rnorm(n=9,mean=100,sd=20)) result.values$doy.observed <- round(rnorm(n=9,mean=100,sd=20)) ## create maps result.pic.maps(values=result.values, picPath=getwd(), picName="beech_budburst", silent=FALSE, createFile=FALSE)
Creates a scatterplot out of result values.
result.pic.scatterplot(values, picPath=getwd(), picName="beech-budburst", createFile=TRUE)
result.pic.scatterplot(values, picPath=getwd(), picName="beech-budburst", createFile=TRUE)
values |
The values for which the scatterplot should be created. |
picPath |
The path where the png-files should be stored. |
picName |
The name of the created file with the scatterplot. |
createFile |
A boolean value determining wether a png-File will be created or not. |
Creates a scatterplot out of result values. The observed values are shown at the abscissa and the modelled values at the ordinate.
Returns nothing but stores the scatterplot as png-file with given path and filename.
Daniel Doktor, Maximilian Lange
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE) ## create scatterplot result.pic.scatterplot(values=result.values, picPath=getwd(), picName="beech_budburst", createFile=FALSE)
## load preprocessed data data(dataFinal) ## load spatial information data(relatedGrid) ## set or load params params <- c(0, 0.058326, 0.109494, 0.039178, -10.34, -0.89, 18.11,-10.03, 28.61, 44.49) ## apply model result <- pim.solve(params, dataFinal, model.no=11, silent=FALSE, out2File=FALSE) ## extract essential results result.values <- result.extract.main( mask.grid=relatedGrid, result.grid=result, model="pim", interpolate=FALSE, silent=FALSE) ## create scatterplot result.pic.scatterplot(values=result.values, picPath=getwd(), picName="beech_budburst", createFile=FALSE)
Calculates the r-square value of a model.
result.rsquare(values, type="cod")
result.rsquare(values, type="cod")
values |
A list containing the modelled (doy.model) and the observed (doy.observed) values. |
type |
The value of type (either ‘cod’ or ‘pearson’) determines whether the coefficient of determination or the squared pearson correlation coefficient is calculated. |
Calculates the r-square value of modelled values with given observed values.
The r-square as numeric value.
Daniel Doktor, Maximilian Lange
modelled <- c(100,102,98,97,96) observed <- rep(100,5) values <- list(doy.model=modelled, doy.observed=observed) result.rsquare(values, type="cod")
modelled <- c(100,102,98,97,96) observed <- rep(100,5) values <- list(doy.model=modelled, doy.observed=observed) result.rsquare(values, type="cod")
This dataset contains interpolated temperature data based on data obtained from WebWerdis, the Web-based weather request and distribution system of the German Weather Service (DWD). The interpolation was done via external drift kriging provided by the ‘gstat’ package.
data(temperatures)
data(temperatures)
A matrix containing 4 years (366 days) of temperature data at 9 different locations given by relatedGrid
.
WebWerdis (DWD)
Krige, D.G., 1951. A statistical approach to some basic mine valuation problems on the witwatersrand. Journal of the Chemical, Metallurgical and Mining Society of South Africa 52, 119-139. Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences 30, 683-691.
Applies a temperature-sum-model to a given dataset.
tsm.solve(params, data, silent=FALSE, out2File=FALSE)
tsm.solve(params, data, silent=FALSE, out2File=FALSE)
params |
The parameters for the temperature-sum-model as list or vector with following order: |
data |
A dataset containing the station ID, the station geographic and the Gauss-Krueger-coordinates of the station,
the altitude of the station, the year and the julian day of the budburst and the leafcolouring,
outlier information for budburst and leafcolouring and temperature data for modelling. Can be created by using the function |
silent |
A boolean value determining wether the function should generate output messages or not. |
out2File |
A boolean value determining wether the output will be stored in log-files. |
Applies a temperature-sum-model with given parameters to a given dataset.
A dataset containing the values of the origin dataset and additionally the modelled budburst days.
Daniel Doktor, Maximilian Lange
Menzel, A. (1997). Phaenologie von Waldbaeumen unter sich aendernden Klimabedingungen - Auswertung der Beobachtungen in den Internationalen Phaenologischen Gaerten und Moeglichkeiten der Modellierung von Phaenodaten. Thesis. Forstwissenschaftliche Fakultaet der Uni Muenchen. Muenchen, Universitaet Muenchen.
## load preprocessed data data(dataFinal) ## set or load params params <- c(0, 100) ## apply model result <- tsm.solve(params, dataFinal, silent=FALSE, out2File=FALSE)
## load preprocessed data data(dataFinal) ## set or load params params <- c(0, 100) ## apply model result <- tsm.solve(params, dataFinal, silent=FALSE, out2File=FALSE)
Converts geographic coordinates to Gauss-Krueger-Coordinates.
util.geoco2gk(x,y, meridian=4)
util.geoco2gk(x,y, meridian=4)
x |
A vector of longitudes to transform. |
y |
A vector of latitudes to transform. |
meridian |
The referenced meridian for Gauss-Krueger-Coordinates. |
Converts geographic coordinates (longitude, latitude) to Gauss-Krueger-Coordinates (‘Rechtswert’, ‘Hochwert’) referenced by a given meridian.
A matrix containing the the ‘Rechtswert’ of the Gauss-Krueger-Coordinates in its first column and the ‘Hochwert’ in its second column.
Daniel Doktor, Maximilian Lange
x <- c(51.3, 54.7) y <- c(12.3, 13.5) gk.xy <- util.geoco2gk(x,y,4)
x <- c(51.3, 54.7) y <- c(12.3, 13.5) gk.xy <- util.geoco2gk(x,y,4)
Checks wether a given year is a leap year or not.
util.isLeapYear(year)
util.isLeapYear(year)
year |
A year or vector of years to check. |
This function checks wether a year (yyyy) is a leap year or not.
Returns a boolean vector determining wether the given years are leap years (TRUE) or not (FALSE).
Daniel Doktor, Maximilian Lange
util.isLeapYear(2000:2012)
util.isLeapYear(2000:2012)