Learn R Programming

hydroToolkit (version 0.1.0)

read_DGI: Reads data from Departamento General de Irrigaci<U+00F3>n (Mendoza - Argentina)

Description

Reads the Departamento General de Irrigacion(Mendoza - Argentina) excel sheet.

Usage

read_DGI(file, sheet = NULL, colName = NULL, range = NULL, path = NULL)

Arguments

file

string with the file name ('xlsx' excel files).

sheet

sheet to read. Either a string (the name of a sheet), or an integer (the position of the sheet). Default value is sheet one.

colName

string with the name of the second column (as default first column is Date). If ignored first row excel names are used.

range

string providing cell range to read. E.g.: 'A1:B75'.

path

string with the files directory. If not provided, the function will use the current working directory.

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

Run this code
# NOT RUN {
# Relative path to raw data
full_path <- system.file('extdata', package = "hydroToolkit")

# Apply function
toscas_hr <- read_DGI(file = 'Toscas.xlsx', sheet = 'hr',
                colName = 'RH(%)', path = full_path)

# }

Run the code above in your browser using DataLab