read_swat_data | R Documentation |
Read SWAT+ output data
read_swat_data( filename, path, vars = "all", swat_units = "all", date_range = "all" )
filename |
Name of SWAT+ output file |
path |
Path to SWAT+ output files |
vars |
Variables to read from the file. See details |
swat_units |
Vector of spatial units to select from the "unit" column |
date_range |
Date vector (length 2) specifying the date range to read |
This function is used to read SWAT+ output data into a data.frame format.
Data is read from the filename
in the path
directory. The
vars
parameter specifies the columns to read and the swat_units
specifies the units to select.
If vars
is set to "names"
, the function returns a vector of
variable names contained in the file.
The function returns a data.table
object, which is useful for large
datasets. If desired, it can easily be converted to a data.frame
using
as.data.frame
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.