Description Usage Arguments Value Examples
Fetch or set the simulation ID (RUNID) of one or more imported MACRO simulation parameter sets
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | rmacroliteRunId(x, ...)
## S3 method for class 'macroParFile'
rmacroliteRunId(x, ...)
## S3 method for class 'macroParFileList'
rmacroliteRunId(x, ...)
rmacroliteRunId( x, ... ) <- value
## S3 replacement method for class 'macroParFile'
rmacroliteRunId(x, ...) <- value
## S3 replacement method for class 'macroParFileList'
rmacroliteRunId(x, ...) <- value
|
x |
A |
... |
Additional parameters passed to specific methods. |
value |
A single or vector of integer. New value(s) for the RUNID |
WRITE DESCRIPTION HERE.
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 | library( "rmacrolite" )
# # Setup MACRO directory (if needed)
# rmacroliteSetModelVar( "C:/swash/macro" )
# Path to an example par-file
par_file_path <- system.file( "par-files",
"chat_winCer_GW-X_900gHa_d182.par",
package = "rmacrolite" )
# Import the example par-file
par_file <- rmacroliteImportParFile(
file = par_file_path )
# Fetch the current parametrization
rmacroliteRunId( x = par_file )
# [1] 1
# Modify the parameter
par_file2 <- par_file
rmacroliteRunId( x = par_file2 ) <- 555
# Check the result
rid <- rmacroliteRunId( x = par_file2 )
rid
# [1] 555
# Internal control
if( rid != 555 ){
stop( "Test of rmacroliteRunId() failed" ) }
# Clean-up
rm( par_file_path, par_file, par_file2, rid )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.