rvn_rvi_read {RavenR} | R Documentation |
This routine reads in a valid Raven main input (.rvi) file and returns the information about hydrological processes as a data table.
rvn_rvi_read(filename)
filename |
the name of the .rvi file (with .rvi extension included ), either relative to the working directory or absolute. |
This function does not like tabs in the .rvi file - it should be untabified first. Comma-delimited tables with a trailing comma are also problematic. The .rvi file can have arbitrary contents outside of the :HydrologicProcesses- :EndHydrologicProcesses block and :SubBasins-:EndSubBasins command blocks.
Returns a list including a lone item:
HydProcTable |
a data table of hydrologic processes. Includes the following data columns: process type, algorithm, 'from' compartment, 'to' compartment, and condition |
James R. Craig, University of Waterloo
# sample workflow of rvn_rvi_read rvi <- system.file("extdata","Nith.rvi", package="RavenR") %>% rvn_rvi_read(.) # get number of Hydrologic processes nrow(rvi$HydProcTable)