apsimx: Run an APSIM-X simulation

View source: R/apsimx.R

apsimxR Documentation

Run an APSIM-X simulation

Description

Run apsimx from R. It uses ‘system’ (unix) or ‘shell’ (windows) and it attempts to be platform independent.

Usage

apsimx(
  file = "",
  src.dir = ".",
  silent = FALSE,
  value = "report",
  cleanup = FALSE,
  simplify = TRUE,
  xargs
)

Arguments

file

file name to be run (the extension .apsimx is optional)

src.dir

directory containing the .apsimx file to be run (defaults to the current directory)

silent

whether to print messages from apsim simulation

value

how much output to return:
option ‘report’ returns only the ‘main’ report component;
option ‘all’ returns all components of the simulation;
option ‘none’ does not create a data.frame but it generates the databases;
option ‘user-defined’ should be the name of a specific table

cleanup

logical. Whether to delete the .db file generated by APSIM-X. Default is FALSE

simplify

whether to return a single data frame when multiple reports are present. If FALSE it will return a list.

xargs

extra arguments to be passed to the APSIM-X run. Use function xargs_apsimx.

Details

Run an APSIM-X Simulation

A valid apsimx file can be run from within R. The main goal is to make running APSIM-X simple, especially for large scale simulations or parameter optimization

Value

a data frame with the ‘Report’ from the APSIM-X simulation. The return value depends on the argument ‘value’ above.

Examples


## See function 'apsimx_example' and vignette 'apsimx'



femiguez/apsimx documentation built on April 13, 2024, 12:04 a.m.