# NOT RUN {
# Create BDHI hydro-met station
guido <- create_hydroMet(class_name = 'BDHI')
# List with meteorological variables (slots in BDHI's object)
cargar <- list('precip', 'Qmd', 'Qmm')
# Now assign as names the files
hydro_files <- list.files( system.file('extdata', package = "hydroToolkit"), pattern = 'Guido' )
names(cargar) <- hydro_files
# Build the object with the met records
guido <- build_hydroMet(obj = guido, slot_list = cargar,
path = system.file('extdata', package = "hydroToolkit") )
# Get mean daily discharge and report miss data
Qmd <- get_hydroMet(obj = guido, name = 'Qmd')[[1]]
miss <- report_miss_data(df = Qmd)
# Now interpolate miss values
Qmd_fill <- interpolate(df = Qmd, miss_table = miss, threshold = 5, method = "linear")
# }
Run the code above in your browser using DataLab