rmacroliteExportParFile-methods: Export parameters for one or several MACRO simulations

Description Usage Arguments Value See Also Examples

Description

Export parameters for one or several MACRO simulations

Usage

1
2
3
4
5
rmacroliteExportParFile(x, f = NULL, verbose = 1L, ...)

## S3 method for class 'macroParFile'
rmacroliteExportParFile(x, f = NULL,
  verbose = 1L, ...)

Arguments

x

A macroParFile object, containing one simulations to be exported

f

Single character string. Name of, and optionally path to, the par-file where the simulations par-file should be written. If NULL, a name will be attributed using the template given by getRmlPar("fileNameTemplate") and the RUNID contained in the par-file.

verbose

Single integer value. If set to a value < 1, the program is silent (except on errors or warnings). If set to 1, the program outputs messages. Values > 1 may also activate messages from lower level functions (for debugging purpose).

...

Additional parameters passed to specific methods.

Value

WRITE DESCRIPTION HERE.

See Also

rmacroliteExport.

Examples

 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
library( "rmacrolite" )

#   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 ) 

#   Path where the file will be exported (temporary directory)
export_path <- tempfile( fileext = ".par" )

#   Export the par-file elsewhere
rmacroliteExportParFile( x = par_file, f = export_path )

#   Internal control
md5_files <- as.character( tools::md5sum( files = c( 
    par_file_path, export_path ) ) ) 

md5_files 

#   
if( md5_files[ 1L ] != md5_files[ 2L ] ){ 
    stop( "Test of rmacroliteExportParFile() failed" ) } 


#   Clean-up
rm( par_file_path, par_file, export_path, md5_files )

julienmoeys/rmacrolite documentation built on May 22, 2019, 6:31 p.m.