Description Usage Arguments Value Examples
Standard APSIM simulations are provided by the default APSIM installation.
apsim_example
moves those example files into the working directory wd
so you can run them
or edit them using apsim
and edit_apsim
, respectively. Generally the
example simulations must be moved because the output file is written to the directory containing
the .apsim file and the ability to write in the "Program Files" can be limited in some cases.
1 | example_apsim(path, wd = getwd(), files = NULL, ...)
|
path |
path to the APSIM installation |
wd |
working directory containing the .apsim files to be copied; defaults to the current working directory |
files |
files to extract from the "Examples" folder |
... |
additional arguments passed to |
logical; if TRUE
the corresponding file was successfully copied, FALSE
otherwise
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
apsimPath <-"C:/Program Files (x86)/Apsim75-r3008/"
apsimWd <- "~/APSIM"
toRun <- "Canopy.apsim"
example_apsim(path = apsimPath, wd = apsimWd, files = toRun) #TRUE
toRun <- c("Canopy.apsim", "Continuous Wheat.apsim")
example_apsim(path = apsimPath, wd = apsimWd, files = toRun) #TRUE TRUE
apsimExe <-"C:/Program Files (x86)/Apsim75-r3008/Model/Apsim.exe"
results <- apsim(exe = apsimExe, wd = apsimWd, files = toRun)
plot(results[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.