rmacroliteImportParFile-methods: Imports parameters from one or several MACRO...

Description Usage Arguments Value Examples

Description

Imports parameters from one or several MACRO parameter-file(s)

Usage

1
2
3
4
5
rmacroliteImportParFile(file, climate = TRUE, verbose = 1L, ...)

## Default S3 method:
rmacroliteImportParFile(file, climate = TRUE,
  verbose = 1L, ...)

Arguments

file

Single character string or vector of character strings. Name(s) of the MACRO In FOCUS parameter file(s) (par-file) to be imported. The file(s) should be located in the same folder as the MACRO In FOCUS executable (see rmacroliteSetModelVar), or in a subfolder in this folder (in this case indicate the relative path, not the full path).

Notice that R file separator is a slash (/), or a double slash, but not a single backslash (although double backslash would work).

climate

Single logical value. If TRUE (the default), the function checks that the climate files exists and stop if they don't.

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 readLines.

Value

Returns a 'macroParFile' object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 ) 

#   Clean-up
rm( par_file_path, par_file )

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