-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f5ccbbd
Showing
27 changed files
with
1,092 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Package: RClimMAWGEN | ||
Maintainer: Emanuele Cordano <emanuele.cordano@gmail.com> | ||
License: GPL (>= 2) | ||
Title: RClimMAWGEN (R Climate Index Multi-site Auto-regressive Weather | ||
GENeretor): a package to generate time series of climate | ||
indices from RMAWGEN generations. | ||
Type: Package | ||
Author: Emanuele Cordano, Annalisa Di Piazza | ||
Description: This package contains wrapper functions and methods which | ||
allow to use "climdex.pcic" and "RMAWGEN" packages. With this | ||
simple approach it is possible to calculate climate change | ||
indices, suggested by the WMO-CCL, CLIVAR, | ||
ETCCDMI(http://www.climdex.org),on stochastic generations of | ||
temperature and precipitation time series, obtained by the | ||
application of RMAWGEN. Each index can be applied to both | ||
observed data and to synthetic time series produced by the | ||
Weather Generator, over a reference period (e.g. 1981-2010, as | ||
in the example). It contains also functions and methods to | ||
evaluate the generated time series of climate change indices | ||
consistency by statistical | ||
tests.Bugs/comments/questions/collaboration of any kind are | ||
warmly welcomed. | ||
Version: 1.0 | ||
Repository: CRAN | ||
Date: 2013-02-25 | ||
Depends: R (>= 2.10),climdex.pcic,RMAWGEN | ||
URL: http://presentations.copernicus.org/EGU2012-5404_presentation.pdf | ||
Collate: 'accepted.R' 'as.clindex.data.frame.R' 'as.data.frame.R' | ||
'clindex.data.frame.R' 'ks.test.R' 'RClimMAWGEN-package.R' | ||
'temperature_max.R' 'temperature_min.R' 'wilcox.test.R' | ||
Packaged: 2013-02-25 19:04:06 UTC; ecor | ||
NeedsCompilation: no | ||
Date/Publication: 2013-02-25 20:16:31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
7531ef00a37c5635fb1155e06b449909 *DESCRIPTION | ||
258069e70c4caefef072e359ecf2f1fa *NAMESPACE | ||
750b57799258a2c90ade5d9aea2aa05e *R/RClimMAWGEN-package.R | ||
89b143a32235e88511ce892115b8d852 *R/accepted.R | ||
1b75f811fe6a60ff76d63b2a99ec7950 *R/as.clindex.data.frame.R | ||
4e1b25794b176c9000fe12d14b0534d4 *R/as.data.frame.R | ||
f5f8fa17b0253e317d345882b71af30e *R/clindex.data.frame.R | ||
a9dadc0e4a367c6c45081d344ef1e843 *R/ks.test.R | ||
9920d3b4d7335245432053e20a73da42 *R/temperature_max.R | ||
583b122acbed0c0a69f19cbf19e01d30 *R/temperature_min.R | ||
b5cb98d1c1bed23458625c5a2e1c2e5d *R/wilcox.test.R | ||
74fe9a8e7d1d29c39ed9ebb97e48e2b9 *data/datalist | ||
4ac77bbbb2c8a1256ff543572f98c014 *data/generation_p1.rda | ||
161235ebd02e9af7eaedf29eb852c978 *data/trentino_1958_2010.rda | ||
c92f791f23d137b27acae1089a503533 *inst/examples/generations.R | ||
eed3828dd6a287a5df3e2d1e8116785d *man/RClimMAWGEN-package.Rd | ||
283ee7c4c01a34652bf6ac5be2822674 *man/accepted.Rd | ||
e76e0ca68cb0e66ea54368721ffeffb2 *man/as.climdex.data.frame.Rd | ||
70f19ec0724aae951e928a4dec104ade *man/as.data.frame.Rd | ||
77005f33a88701c057a1e89a64523850 *man/climdex.data.frame.Rd | ||
bd96fcd5ad3ee7dc8e04f1d76a6436db *man/generation_p1.Rd | ||
779db5334535131e58cf80e7c2182aa7 *man/ks.test.climdex.data.frame.Rd | ||
219256cdfbd791e3895e03db5c362c41 *man/temperature_max_daily.Rd | ||
a824610f17fd73e6e1d08b6a74f55d46 *man/temperature_min_daily.Rd | ||
7dc8ef119bbd795ac00d0ea42ba1413d *man/trentino_1958_2010.Rd | ||
aa1f4ef2889ec8d455b6320d2aa333ca *man/wilcox.test.Rd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export(accepted) | ||
export(as.climdex.data.frame) | ||
export(climdex.data.frame) | ||
export(ks.test.climdex.data.frame) | ||
export(temperature_max_daily) | ||
export(temperature_min_daily) | ||
import(stats) | ||
S3method(as.data.frame,climdex.data.frame) | ||
S3method(wilcox.test,climdex.data.frame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# TODO: Add comment | ||
# | ||
# Author: ecor | ||
############################################################################### | ||
|
||
|
||
#' | ||
#' This package contains wrapper functions and methods which allow to use "climdex.pcic" and "RMAWGEN" packages. | ||
#' | ||
|
||
#' | ||
#' \tabular{ll}{ | ||
#' Package: \tab RClimMAWGEN\cr | ||
#' Type: \tab Package\cr | ||
#' Version: \tab 1.0\cr | ||
#' Date: \tab 2013-02-21\cr | ||
#' License: \tab GPL (>= 2) \cr | ||
#' LazyLoad: \tab yes\cr | ||
#' Depends: climdex.pcic,RMAWGEN \cr | ||
#' } | ||
#' | ||
#' | ||
#' | ||
#' | ||
#' | ||
#' | ||
#' | ||
#' @name RClimMAWGEN-package | ||
#' @aliases RClimMAWGEN | ||
#' @docType package | ||
#' @title RClimMAWGEN | ||
#' @author Emanuele Cordano \email{emanuele.cordano@@gmail.com}, Annalisa Di Piazza \email{annalisadipiazza79@@gmail.com} | ||
|
||
#' | ||
#' @note RClimMAWGEN has been created in the frame of CLI3 project and ACE-SAP (\url{http://www.ace-sap.it/}) and ENVIROCHANGE (\url{http://www.envirochange.eu/}) projects | ||
#' funded by Provincia Autonoma di Trento (\url{http://www.provincia.tn.it/}). | ||
#' | ||
#' RClimMAWGEN is free software: you can redistribute it and/or modify | ||
#' it under the terms of the GNU General Public License as published by | ||
#' the Free Software Foundation, either version 3 of the License, or | ||
#' (at your option) any later version. | ||
#' | ||
#' RClimMAWGEN is distributed in the hope that it will be useful, | ||
#' but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
#' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
#' GNU General Public License for more details. | ||
#' | ||
#' You should have received a copy of the GNU General Public License | ||
#' along with this program. If not, see \url{http://www.gnu.org/licenses/}. | ||
#' | ||
#' @keywords package, climate indices, temperature, precipitation, time-series | ||
# @seealso \code{\link{is.pseudoprime}} | ||
# @examples data(trentino) | ||
# | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
NULL | ||
#' | ||
#' This functions lists the realizations which pass successfully Ks or Wilcoxon test. | ||
#' | ||
#' @title Which generations pass the tests with success? | ||
#' | ||
#' @param tests list of objects returned by \code{\link{wilcox.test}} and \code{\link{ks.test}} | ||
#' @param significance significance for statistical tests (maximum accepted \code{p-Value}). Default is 0.05. | ||
#' @return Vector with names of successful realizations. | ||
#' | ||
#' @export | ||
#' @seealso \code{\link{climdex.data.frame}},\code{\link{ks.test}},\code{\link{ks.test.climdex.data.frame}},\code{\link{wilcox.test}} | ||
#' @examples | ||
#' | ||
#' # See the example of 'climdex.data.frame' function | ||
#' | ||
|
||
|
||
|
||
|
||
accepted <- function(tests,significance=0.05) { | ||
|
||
out <- names(tests) | ||
|
||
accepted <- array(FALSE,length(out)) | ||
|
||
for (i in 1:length(tests)) { | ||
|
||
if (tests[[i]]$p.value>significance) accepted[i] <- TRUE | ||
|
||
} | ||
|
||
out <- out[accepted] | ||
|
||
return(out) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
NULL | ||
#' | ||
#' This functions transforms a generic data object \code{data} in a \code{clindex.data.frame}-type S3 object | ||
#' | ||
#' | ||
#' @param data the object to be transformed | ||
#' | ||
#' @seealso \code{\link{climdex.data.frame}} | ||
#' | ||
#' @author Emanuele Cordano, Annalisa Di Piazza | ||
#' @export | ||
#' | ||
#' | ||
#' @title Coercion to a ClimDex Data Frame | ||
#' | ||
#' @seealso \code{\link{climdex.data.frame}} | ||
#' | ||
#' | ||
#' | ||
|
||
|
||
|
||
|
||
|
||
|
||
as.climdex.data.frame <- function(data) { | ||
|
||
# print(class(data)) | ||
out <- as.data.frame(do.call(cbind,data)) | ||
class(out) <- "climdex.data.frame" | ||
return(out) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
NULL | ||
#' | ||
#' This method transforms a \code{climdex.data.frame}-type S3 object into a \code{data.frame} object | ||
#' | ||
#' | ||
#' @param x the object to be transformed | ||
#' @param ... further arguments | ||
#' | ||
#' | ||
#' @seealso \code{\link{as.climdex.data.frame}},\code{\link{as.data.frame}} | ||
#' | ||
#' @author Emanuele Cordano, Annalisa Di Piazza | ||
#' @export | ||
#' @title Trasformation of a ClimDex Data Frame to a Data Frame | ||
#' | ||
#' @rdname as.data.frame | ||
#' @method as.data.frame climdex.data.frame | ||
#' @S3method as.data.frame climdex.data.frame | ||
#' @aliases as.data.frame as.data.frame.climdex.data.frame | ||
#' @name as.data.frame | ||
#' @export | ||
#' | ||
#' @author Emanuele Cordano, Annalisa Di Piazza | ||
#' | ||
#' | ||
as.data.frame.climdex.data.frame <- function(x,...) { | ||
|
||
|
||
out <- as.data.frame(do.call(cbind,x)) | ||
|
||
return(out) | ||
|
||
} |
Oops, something went wrong.