read_BDHI {hydroToolkit} | R Documentation |
Reads data from Base de Datos Hidrológica Integrada (BDHI) - Argentina
Description
Reads files downloaded from the Base de Datos Hidrológica Integrada (BDHI) as a data frame.
Usage
read_BDHI(file, colName, timeStep, is.Wdir = FALSE)
Arguments
file |
string with the name (including extension) of the file. |
colName |
string with variable name. E.g.: Qmd(m3/s) |
timeStep |
string with time step: 'month', 'day', 'day/3', '4h' or 'hour'.
|
is.Wdir |
a logical value indicating if the variable is wind direction. Default value is set to FALSE. |
Value
A data frame with two columns: date and variable. Gaps between dates are filled with NA_real_
and duplicated rows are eliminated automatically.
Examples
# Relative path to raw data
full_path <- system.file('extdata', package = "hydroToolkit")
# Apply function
guido_Qmd <- read_BDHI(file = paste0(full_path, '/Qmd_Mendoza_Guido'),
colName = 'Q(m3/s)', timeStep = 'day')