read_snih: Reads data from Servicio Nacional de Información Hídrica...

View source: R/ff_read_snih.R

read_snihR Documentation

Reads data from Servicio Nacional de Información Hídrica (SNIH - Argentina)

Description

Reads excel files downloaded from the SNIH web page as a data frame.

Usage

read_snih(path, by, out_name = NULL)

Arguments

path

path to the xlsx file.

by

string with the time step of the series (e.g.: 'month', 'day', '6 hour', '3 hour', '1 hour', '15 min' ). If you set it as 'none', the function will ignore automatic gap filling.

out_name

optional. String vector with user defined variable(s) column(s) name(s).

Value

A data frame with the data inside the xlsx file. Gaps between dates are filled with NA_real_ and duplicated rows are eliminated automatically.

Examples


# set path to file
path_file <- system.file('extdata', 'snih_qd_guido.xlsx', package = 'hydrotoolbox')

# read daily streamflow with default column name
head( read_snih(path = path_file, by = 'day') )

# now we use the function with column name
head( read_snih(path = path_file,  by = 'day', out_name = 'qd(m3/s)') )



hydrotoolbox documentation built on April 14, 2023, 12:34 a.m.