This function converts a dataset to S3 object of class "streamflow". Data in this format can be provided as arguments to other functions to call default procedures.
Usage
asStreamflow(x,river.name=NULL, start.date=NULL, end.date=NULL,max.na=10)
# S3 method for streamflow
print(x, ...)
# S3 method for streamflow
summary(object, ...)
Arguments
x,object
A matrix with dates in the first column and discharge values in the second column. Dates should be of the format "YYYY-MM-DD".
river.name
A character vector listing the river name.
start.date
Optional character string giving date to start analysis, of the format "YYYY-MM-DD"
end.date
Optional date to start analysis, of the format "YYYY-MM-DD"
max.na
Optional number specifying maximum NA values to allow.
...
Other parameters.
Value
An object of class streamflow containing the following items:
data
Data frame with 8 columns
n
Number of observations in series.
n.nas
Number of NA observations in series.
start
Start date.
end
End date.
name
Name of river.
na.info
Matrix containing the index and start date of all blocks of more than one NA observation.