set_param.Rd
Replace or set an input parameter from a pre-existing STICS input
file. Generally used after calling import_usm()
.
set_param(dirpath = getwd(), param, value, add = F, plant = 1) set_usm(filepath = "new_travail.usm", param, value, add = F) set_station(filepath = "station.txt", param, value, add = F) set_ini(filepath = "ficini.txt", param, value, add = F) set_general(filepath = "tempopar.sti", param, value, add = F) set_tmp(filepath = "tempoparv6.sti", param, value, add = F) set_plant(filepath = "ficplt1.txt", param, value, add = F, variety = NULL) set_tec(filepath = "fictec1.txt", param, value, add = F) set_soil(filepath = "param.sol", param, value) set_out_var(filepath = "var.mod", vars = c("lai(n)", "masec(n)"), add = F)
dirpath | USM directory path |
---|---|
param | Parameter name |
value | New parameter value |
add | Boolean. Append input to existing file (add to the list) |
plant | Plant index. Optional, only for plant or technical parameters |
filepath | Path to the parameter file |
variety | Integer (variety index) or character (variety name), see details. |
vars | Vector of variable names for STICS output requirements |
The plant
parameter can be either equal to 1
, 2
for
the associated plant in the case of intercrop, or c(1,2)
for both
Principal and associated plants.
all_out_var()
is a helper function that returns all possible
output variables.
The variety is read from the technical file when using set_param()
.
To change a value for a particular variety, plase directly use set_plant()
.
set_out_var()
is not used by set_param()
. To replace the output
variables required from STICS, please directly call set_out_var()
.
if (FALSE) { # Replace the interrow distance parameter to 0.01: library(sticRs) set_param(dirpath = "stics_usm/usm_1", param= "interrang", value= 0.01) }