Description Usage Arguments Value Functions Examples
Apply a pre-defined (e.g.: movAvg, fill_value or Qmm_to_Dm) or user defined function to an existing series inside a slot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | modify_hydroMet(
obj,
name = NA_character_,
colName = NA_character_,
colNum = 2,
FUN = NULL,
...
)
## S4 method for signature 'hydroMet_BDHI'
modify_hydroMet(
obj,
name = NA_character_,
colName = NA_character_,
colNum = 2,
FUN = NULL,
...
)
## S4 method for signature 'hydroMet_CR2'
modify_hydroMet(
obj,
name = NA_character_,
colName = NA_character_,
colNum = 2,
FUN = NULL,
...
)
## S4 method for signature 'hydroMet_DGI'
modify_hydroMet(
obj,
name = NA_character_,
colName = NA_character_,
colNum = 2,
FUN = NULL,
...
)
## S4 method for signature 'hydroMet_IANIGLA'
modify_hydroMet(
obj,
name = NA_character_,
colName = NA_character_,
colNum = 1,
FUN = NULL,
...
)
|
obj |
hydroMet_XXX subclass object. See hydroMet_BDHI, hydroMet_DGI, hydroMet_IANIGLA or hydroMet_CR2. |
name |
string with the slot name of the data frame. |
colName |
string with the new column name (from |
colNum |
numeric value with the data frame column where to apply |
FUN |
the function name. |
... |
|
The same hydroMet subclass provided in obj
with an extra column.
modify_hydroMet,hydroMet_BDHI-method
: modify method for BDHI class
modify_hydroMet,hydroMet_CR2-method
: modify method for CR2 class
modify_hydroMet,hydroMet_DGI-method
: modify method for DGI class
modify_hydroMet,hydroMet_IANIGLA-method
: modify method for IANIGLA class
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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") )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.