set_param: Set (replace) STICS input file parameters

Description Usage Arguments Details Note See Also Examples

View source: R/Set_usm.R

Description

Replace or set an input parameter from a pre-existing STICS input file. Generally used after calling import_usm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

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)

Arguments

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

vars

Vector of variable names for STICS output requirements

Details

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 Princiapl and associated plants. all_out_var is a helper function that returns all possible output variables.

Note

set_out_var is not used by set_param. To replace the output variables required from STICS, please directly call set_out_var.

See Also

import_usm.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Replace the interrow distance parameter to 0.01:

library(sticRs)
set_param(dirpath = "stics_usm/usm_1", param= "interrang", value= 0.01)


## End(Not run)

VEZY/sticRs documentation built on Oct. 1, 2018, 1:06 p.m.