Tools for extracting occurrences, assessing potential driving factors, predicting occurrences, and quantifying impacts of compound events in hydrology and climatology.
You can install the development version of CompoundEvents like so:
install.packages("CompoundEvents")
This package is licensed under the GPL-3 license.
This is a basic example which shows you how to solve a common problem:
library(CompoundEvents)
## basic example code
data<-dfptng
summary(dfptng)
#> pre tem nino gpp
#> Min. : 0.000 Min. : 6.973 Min. :-2.18000 Min. :0.2372
#> 1st Qu.: 8.028 1st Qu.:13.392 1st Qu.:-0.59000 1st Qu.:0.4407
#> Median : 47.063 Median :17.990 Median :-0.09000 Median :1.2563
#> Mean : 62.401 Mean :16.748 Mean :-0.04332 Mean :1.9255
#> 3rd Qu.:103.535 3rd Qu.:19.994 3rd Qu.: 0.44250 3rd Qu.:3.2315
#> Max. :299.510 Max. :23.718 Max. : 2.57000 Max. :5.2647
#> NA's :348
## Compute the event occurrence for a month
mp<-data$pre[seq(2, length(data$pre), by = 12)]
mt<-data$tem[seq(2, length(data$tem), by = 12)]
p0=50
t0=50
Y<-GetDH(mp,mt, p0, t0)
You’ll still need to render README.Rmd regularly, to keep README.md
up-to-date. devtools::build_readme() is handy for this