HypeXobs {HYPEtools} | R Documentation |
HypeXobs data frames
Description
Constructor function for data frames which hold HYPE Xobs.txt file contents, i.e. time series of a multiple observation variables for multiple sub-basins and equidistant time steps in POSIXct format in the first column.
Usage
HypeXobs(x, comment, variable, subid, verbose = TRUE)
Arguments
x |
|
comment |
Character string, metadata or other information, first line of a HYPE Xobs.txt file. |
variable |
Character vector of four-letter keywords to specify HYPE variable IDs, corresponding to second to
last column in |
subid |
Integer vector with HYPE sub-basin IDs, corresponding to second to last column in |
verbose |
Logical, throw warning if attribute Not case-sensitive. |
Details
S3 class constructor function for HypeXobs
data frame objects which hold HYPE Xobs.txt file contents. Xobs.txt
files contain three header rows, see the
Xobs.txt description in the HYPE documentation.
These headers are stored as additional attributes in objects.
Value
Returns a data frame of class HypeXobs
with additional attributes
:
- comment
A character vector.
- variable
A character vector of HYPE variable IDs.
- subid
A vector of SUBIDs.
- timestep
Time step keyword,
"day"
, or"n hour"
(n = number of hours).NULL
, ifx
contains just one row.
Examples
# Use the Xobs file import function instead of the class constructor for standard work flows
te <- ReadXobs(file = system.file("demo_model", "Xobs.txt", package = "HYPEtools"))
summary(te)
# Class constructor
HypeXobs(x = as.data.frame(te), comment = comment(te), variable = variable(te), subid = subid(te))