Description Usage Arguments Value Functions Examples
This method allows you to easily cut the data stored in an hydroMet_XXX
class object by dates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
## S4 method for signature 'hydroMet_BDHI'
subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
## S4 method for signature 'hydroMet_DGI'
subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
## S4 method for signature 'hydroMet_CR2'
subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
## S4 method for signature 'hydroMet_IANIGLA'
subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
## S4 method for signature 'hydroMet_compact'
subset_hydroMet(obj, slot_name, from = NULL, to = NULL)
|
obj |
an |
slot_name |
string vector with the slot(s) name(s) to subset. NOTE: in case you want to subset a |
from |
string (or |
to |
string (or |
The same hydroMet_XXX
class provided in obj
but subsetted.
subset_hydroMet,hydroMet_BDHI-method
: subset method for BDHI data
subset_hydroMet,hydroMet_DGI-method
: subset method for DGI data
subset_hydroMet,hydroMet_CR2-method
: subset method for CR2 data
subset_hydroMet,hydroMet_IANIGLA-method
: subset method for IANIGLA data
subset_hydroMet,hydroMet_compact-method
: subset method for compact
data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 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')
# 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") )
# Subset daily mean discharge
guido <- subset_hydroMet(obj = guido, slot_name = 'Qmd', from = '2005-01-01',
to = '2010-12-31')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.