convert_xml2txt: Transforming a STICS xml file into a text file

View source: R/convert_xml2txt.R

convert_xml2txtR Documentation

Transforming a STICS xml file into a text file

Description

The input file according to his type (ini,plant,tec,station,soil,par) is converted to a text file readable by the STICS model (ficini.txt, ficplt1.txt,...)

Usage

convert_xml2txt(
  file,
  plant_id = 1,
  out_dir = NULL,
  save_as = NULL,
  stics_version = "latest",
  xml_file = lifecycle::deprecated(),
  plt_num = lifecycle::deprecated(),
  out_file = lifecycle::deprecated()
)

Arguments

file

Path (including name) of the xml file to convert

plant_id

The plant identifier (main crop: 1 ; associated crop: 2)

out_dir

Path of the directory where to generate the file. Optional, set to the path of the input xml file by default

save_as

Name of the output file (optional, default: fixed name for STICS)

stics_version

the STICS files version to use (optional, default to latest).

xml_file

[Deprecated] xml_file is no longer supported, use file instead.

plt_num

[Deprecated] plt_num is no longer supported, use plant_id instead.

out_file

[Deprecated] out_file is no longer supported, use save_as instead.

Value

None

Examples


## Not run: 
xml_path <- "/path/to/corn_plt.xml"
javastics_path <- "/path/to/JavaSTICS/folder"
convert_xml2txt(file = xml_path, javastics = javastics_path)

## End(Not run)


SticsRFiles documentation built on Sept. 12, 2024, 7:41 a.m.