apsim: Run an APSIM (7.x) 'Classic' simulation

View source: R/apsim_classic.R

apsimR Documentation

Run an APSIM (7.x) ‘Classic’ simulation

Description

Run apsim from R. It's for Windows only. It uses ‘shell’.

Usage

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

Arguments

file

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

src.dir

directory containing the .apsim 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’ runs simulation but does not return a data frame;
option ‘user-defined’ should be the name of a specific output file.

cleanup

logical. Whether to delete the .out and .sum files generated by APSIM. Default is FALSE.

simplify

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

Details

Run an APSIM (7.x) ‘Classic’ Simulation

A valid apsim 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

This function returns a data frame with APSIM output, but it depends on the argument ‘value’ above.

Examples


## See function 'apsim_example' 



apsimx documentation built on Sept. 11, 2024, 5:42 p.m.