| read_rch {SWAT2R} | R Documentation |
Function for reading the ‘output.rch’ files of SWAT 2005 (regarding reaches), and giving as output a data.frame with the columns of the read file.
The ‘output.rch’ file has 9 rows representing the header, 1 colum with the text 'REACH', and 43 additional colums with results regarding water quantity, sediments, and water quality
read_rch(file="output.rch", out.type="Q", rchID=NA, col.names=NULL, tstep,
Date.Ini, Date.Fin, date.fmt="%Y-%m-%d", verbose=TRUE)
file |
the name of the file which the data are to be read from. If it does not contain an _absolute_ path, the file name is _relative_ to the current working directory, 'getwd()'. Tilde-expansion is performed where supported. |
out.type |
Type of results that have to be read. It must be one of the following values: |
rchID |
OPTIONAL. Integer with the number of the reach for wich the results will be provided. |
col.names |
OPTIONAL. character with the column name in |
tstep |
Time step used for the simulation that created the ‘output.rch’ file. |
Date.Ini |
OPTIONAL, only used when |
Date.Fin |
OPTIONAL, only used when |
date.fmt |
character, with the format used to define |
verbose |
logical; if TRUE, progress messages are printed |
Mauricio Zambrano-Bigiarini, mzb.devel@gmail.com