Description Usage Arguments Author(s) See Also Examples
View source: R/subdaily2daily.R
Generic function for transforming a Sub-DAILY time series into a DAILY one
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | subdaily2daily(x, ...)
## Default S3 method:
subdaily2daily(x, FUN, na.rm = TRUE, start="00:00:00", ...)
## S3 method for class 'zoo'
subdaily2daily(x, FUN, na.rm = TRUE, start="00:00:00", ...)
## S3 method for class 'data.frame'
subdaily2daily(x, FUN, na.rm = TRUE, start="00:00:00",
dates=1, date.fmt="%Y-%m-%d %H:%M:%S", out.fmt="zoo",
verbose= TRUE, ...)
## S3 method for class 'matrix'
subdaily2daily(x, FUN, na.rm = TRUE, start="00:00:00",
dates=1, date.fmt="%Y-%m-%d %H:%M:%S", out.fmt="zoo",
verbose= TRUE, ...)
|
x |
xts, data.frame or matrix object, with sub-daily time series. |
FUN |
Function that have to be applied for transforming from sub-daily to daily time step. (e.g., for precipitation |
na.rm |
Logical. Should missing values be removed? |
start |
character, indicating the starting time used for aggregating subdaily time series into daily ones. It MUST be provided in the |
dates |
numeric, factor, POSIXct or POSIXt object indicating how to obtain the dates and times for each gauging station |
date.fmt |
character indicating the format in which the dates are stored in |
out.fmt |
OPTIONAL. Only used when |
verbose |
logical; if TRUE, progress messages are printed |
... |
further arguments passed to or from other methods. |
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
subdaily2monthly
, subdaily2annual
, subdaily2seasonal
, as.POSIXct
, dm2seasonal
, monthlyfunction
, seasonalfunction
, hydroplot
, vector2zoo
, izoo2rzoo
1 2 3 4 5 6 7 8 9 10 11 12 | ## Loading the time series of hourly streamflows for the station Karamea at Gorge
data(KarameaAtGorgeQts)
x <- KarameaAtGorgeQts
# Plotting the hourly streamflow values
plot(x)
## sub-daily to Daily
d <- subdaily2daily(x, FUN=sum, na.rm=TRUE)
# Plotting the daily streamflow values
plot(d)
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: xts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.