read_CR2 {hydroToolkit} | R Documentation |
Reads data from Explorador Climático de Chile
Description
Reads data downloaded from Explorador Climatico de Chile (CR2) as a data frame.
Usage
read_CR2(file, colName, path = NULL)
Arguments
file |
string with the file name (include extension). The only accepted format is '.csv'. |
colName |
string with the name of the variable. |
path |
string with the files directory. If not provided, the function will use the current working directory. |
Value
A two column data frame with 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
yeso_tmed <- read_CR2(file = 'Tmed_Yeso_Embalse.csv',
colName = 'T(ºC)', path = full_path)
[Package hydroToolkit version 0.1.0 Index]