# list cr2 files
list.files( system.file('extdata', package = 'hydrotoolbox'), pattern = 'cr2' )
# set path to file
path_tmax <- system.file('extdata', 'cr2_tmax_yeso_embalse.csv',
package = 'hydrotoolbox')
# read file with default colname
head( read_cr2(path = path_tmax) )
# assign a column name
head( read_cr2(path = path_tmax, out_name = 'tmax(°C)') )
Run the code above in your browser using DataLab