getAnnual | R Documentation |
Get annual rainfall of different raninfall time series.
getAnnual(data, output = "series", minRecords = 355, ...)
## S4 method for signature 'data.frame'
getAnnual(data, output = "series", minRecords = 355, ...)
## S4 method for signature 'list'
getAnnual(data, output = "series", minRecords = 355, ...)
data |
A list containing different time series of different rainfall gauges. Or a dataframe with first column Date and the rest columns the value of different
gauging stations. Usually an output of |
output |
A string showing the output output. |
minRecords |
A number showing the minimum accept record number, e.g. for a normal
year(365 days), if |
... |
|
It is a generic function, if in your case you need to debug, please see ?debug()
for how to debug S4 method.
The annual rainfall and the number of missing data of each year and each rainfall gauge, which will also be plotted. If output "mean" is seleted, the mean annual rainfall will be returned.
H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York, 2009.
Hadley Wickham (2007). Reshaping Data with the reshape Package. Journal of Statistical Software, 21(12), 1-20. URL http://www.jstatsoft.org/v21/i12/.
R Core Team (2015). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
#datalist is provided by the package as a test.
data(testdl)
a <- getAnnual(testdl)
#set minRecords to control the calculation of annual rainfall.
b <- getAnnual(testdl, output = 'mean', minRecords = 350)
c <- getAnnual(testdl, output = 'mean', minRecords = 365)
a1 <- extractPeriod(testdl, comm = TRUE)
a2 <- list2Dataframe(a1)
getAnnual(a2)
a3 <- fillGap(a2)
getAnnual(a3)
# More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.