Description Usage Arguments Value Author(s) See Also Examples
This function takes a data.frame whose columns contains the time series of several gauging stations, along with a character representing the name of one gauging station, and extracts the time series corresponding to that station.
1 2 |
x |
data.frame containing the complete times series of all the stations. |
sname |
Character representing the name of a station, which have to correspond to one column name in |
dates |
numeric, factor, Date object indicating how to obtain the dates corresponding to the |
date.fmt |
character indicating the format in which the dates are stored in dates, e.g. %Y-%m-%d. See |
var.type |
character representing the type of variable being plotted. Used for determining the function used for computing the monthly or/and annual values when |
tstep.out |
character that defines the time step of the desired output time series. Valid values are: |
FUN |
ONLY required when |
na.rm |
a logical value indicating whether 'NA' values should be stripped before the computation proceeds. |
from |
OPTIONAL, used for extracting a subset of values. |
to |
OPTIONAL, used for extracting a subset of values. |
zoo object
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
1 2 3 4 5 | ## Loading the monthly time series of precipitation within the Ebro River basin.
data(EbroPPtsMonthly)
## Annual values of temperature at the station "T9105", stored in 'EbroPPtsMonthly'.
sname2ts(EbroPPtsMonthly, sname="P9001", dates=1, FUN=sum, tstep.out="annual")
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: xts
1941-01-01 1942-01-01 1943-01-01 1944-01-01 1945-01-01 1946-01-01 1947-01-01
1094.7 1059.5 978.2 936.4 848.1 700.7 869.7
1948-01-01 1949-01-01 1950-01-01
571.7 762.7 807.1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.