Package: SticsRFiles 1.7.3

Patrice Lecharpentier

SticsRFiles: Read and Modify STICS Input/Output Files

Manipulating input and output files of the 'STICS' crop model (Beaudouin et al. (2022) <doi:10.35690/978-2-7592-3679-4>). The package is based on the model software, which is accessible, as well as resources, on its web site <https://stics.inrae.fr/eng/>. Files are either 'JavaSTICS' XML files or text files used by the model 'fortran' executable. Most basic functionalities are reading or writing parameter names and values in both XML or text input files, and getting data from output files. Advanced functionalities include XML files generation from XML templates and/or spreadsheets, or text files generation from XML files by using 'xslt' transformation.

Authors:Patrice Lecharpentier [aut, cre], Remi Vezy [aut], Samuel Buis [aut], Michel Giner [aut], Timothee Flutre [aut], Valentine Rahier [aut], Thomas Robine [ctb], Amine Barkaoui [ctb], Patrick Chabrier [ctb], Julie Constantin [rev], Dominique Ripoche [rev], Marie Launay [rev], Alain Mollier [rev], Christine Le Bas [rev], Joel Leonard [rev]

SticsRFiles_1.7.3.tar.gz
SticsRFiles_1.7.3.zip(r-4.7-any)SticsRFiles_1.7.3.zip(r-4.6-any)SticsRFiles_1.7.3.zip(r-4.5-any)
SticsRFiles_1.7.3.tgz(r-4.6-any)SticsRFiles_1.7.3.tgz(r-4.5-any)
SticsRFiles_1.7.3.tar.gz(r-4.7-any)SticsRFiles_1.7.3.tar.gz(r-4.6-any)
SticsRFiles_1.7.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
SticsRFiles/json (API)

# Install 'SticsRFiles' in R:
install.packages('SticsRFiles', repos = c('https://sticsrpacks.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sticsrpacks/sticsrfiles/issues

On CRAN:

Conda:

9.30 score 5 stars 2 packages 92 scripts 596 downloads 73 exports 42 dependencies

Last updated from:326af29a96. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK228
source / vignettesOK237
linux-releaseOK237
macos-releaseOK177
macos-oldrelOK171
windows-develOK208
windows-releaseOK220
windows-oldrelOK196
wasm-releaseOK120

Exports:approx_vapour_pressurecompute_date_from_daycompute_day_from_dateconvert_xml2txtdownload_datadownload_usm_csvdownload_usm_xlextract_workspaceforce_param_valuesgen_general_param_xmlgen_ini_xmlgen_obsgen_obs_sdgen_sols_xmlgen_sta_xmlgen_tec_xmlgen_usms_xmlgen_usms_xml2txtgen_varmodget_climate_txtget_cultivars_listget_cultivars_paramget_dev_stagesget_examples_pathget_files_listget_general_txtget_ini_txtget_lai_forcingget_obsget_obs_sdget_param_infoget_param_txtget_param_xmlget_plant_txtget_plants_nbget_report_resultsget_simget_soil_txtget_soils_listget_station_txtget_stics_versions_compatget_tec_txtget_tmp_txtget_usm_txtget_usms_listget_var_infoget_varmodget_xml_files_param_dfis_macis_stics_paramis_stics_varis_unixis_windowsread_params_tableset_general_txtset_ini_txtset_param_txtset_param_xmlset_plant_txtset_soil_txtset_station_txtset_tec_txtset_tmp_txtset_usm_txtupgrade_ini_xmlupgrade_param_gen_xmlupgrade_param_newform_xmlupgrade_plt_xmlupgrade_sols_xmlupgrade_sta_xmlupgrade_tec_xmlupgrade_usms_xmlupgrade_workspace_xml

Dependencies:askpassassertthatclicodetoolscpp11crayoncurldata.tabledoParalleldplyrforeachgenericsgluehttriteratorsjsonlitelifecyclelubridatemagrittrmimeopensslpillarpkgconfigpurrrR6Rcpprlangrstudioapisemverstringistringrsystibbletidyrtidyselecttimechangeutf8vctrswithrXMLxml2xslt

SticsRFiles
Introduction | Concepts | Input files | Text files | XML files | Short example | Example data | Example usage | Find a STICS variable | Get informations on parameters | Get parameter values | Set parameter values | Generate observations files | Read observations files | Read simulation files

Last update: 2026-10-05
Started: 2020-01-16

Upgrading STICS XML files
Upgrading a whole workspace | Case 1: the initial workspace does not contain all needed files | Case 2: the initial workspace contains all the input files | Upgrading a specific file kind | Warnings and messages

Last update: 2026-09-04
Started: 2022-07-12

Manipulating STICS text files
Overview | Getting parameter value | Getting the meteorological data | Setting parameter value | Set the output variables

Last update: 2025-06-06
Started: 2020-01-24

Generating STICS text files from XML files
Introduction | Converting JavaSTICS workspace files | Converting files into separated folders (one per usm) | Converting files into one folder (overwriting case)

Last update: 2025-06-03
Started: 2020-01-20

Generating STICS XML files from tabulated data
Introduction | Package functions to be used | Getting a table file example | Getting inputs Excel example file from the SticsRFiles package | Getting an USMs inputs CSV example file from the SticsRFiles package | Description of tables expected content and use | Important information | Specificities of Excel sheets | Common tables specifications | Data consistency checks in tables | USMs table example | Generating the usms XML file (usms.xml) | Getting data | Generating the file | usms.xml file content | Generating the sols XML file (sols.xml) | sols.xml file content | Generating multiple crop management XML files (*_tec.xml) | Generating files | Generating multiple initialization XML files (*_ini.xml) | XML file content | Generating multiple meteorological station XML files (*_sta.xml) | Generating general parameters XML files (param_gen.xml and param_newform.xml)

Last update: 2025-06-03
Started: 2019-12-20

Manipulating STICS XML files
Introduction | Understanding what are parameters in STICS XML files | XML files structures describing parameters | Functions for XML files manipulations | Getting XML files examples from the SticsRFiles library | Getting the XML files source directory | Examples files | Copying files in a local directory | A specific file | All files | Getting information about parameters | Searching parameters names from files | Getting all STICS parameters information | Getting information about one or more parameters | Getting parameters information using partial names matching | Searching parameters using keywords | Getting parameters values from XML files | Scalar parameters extraction | Vector parameters extraction | Getting all parameters values from files | Replacing parameters values in XML files | Defining the output file using function arguments | Scalar parameters | Vector parameters

Last update: 2025-06-03
Started: 2019-12-20

Readme and manuals

Help Manual

Help pageTopics
'[' method for 'cropr_simulation'[.cropr_simulation
Approximate vapour pressureapprox_vapour_pressure
Convert day number into datecompute_date_from_day
Convert date into day numbercompute_day_from_date
Transforming a STICS xml file into a text fileconvert_xml2txt
Download example USMsdownload_data
Downloading a CSV usms data file example into a directorydownload_usm_csv
Downloading an Excel usms data file example into a directorydownload_usm_xl
Extract an XML JavaSTICS workspace from a source workspaceextract_workspace
Generates files to force parameters values in STICS simulationsforce_param_values
Generate STICS general parameters xml file(s) from a template file according to a STICS versiongen_general_param_xml
Generate STICS ini xml file(s) from a template or an input filegen_ini_xml
Generating observation data files from a data.framegen_obs
Generating observation data standard deviation files from a data.frame as for generating observations data files ('gen_obs')gen_obs_sd
Generate STICS sols xml file from a template or an input filegen_sols_xml
Generate STICS sta xml file(s) from a template or an input filegen_sta_xml
Generate STICS tec xml file(s) from a template or an input filegen_tec_xml
Generate STICS usms xml file from a template or an input filegen_usms_xml
Generating one or several usms directories with STICS input files from a javastics workspace contentgen_usms_xml2txt
Generating a var.mod type filegen_varmod
Read STICS input meteorology fileget_climate_txt
Get the cultivar names for an xml plant file (*_plt.xml)get_cultivars_list
Get the values of cultivar-specific parameters from an xml plant file (*_plt.xml)get_cultivars_param
Get developmental stages from simulationsget_dev_stages
Getting examples files path attached to a STICS version for a given file typeget_examples_path
Getting existing xml files path list per usm from an usms.xml fileget_files_list
Getting LAI forcing for each usmget_lai_forcing
Read STICS observation files (*.obs)get_obs
Read STICS observation standard deviation files (*.sd)get_obs_sd
Finding parameters information using partial search wordsget_param_info
Read STICS input parameters from text filesget_general_txt get_ini_txt get_param_txt get_plant_txt get_soil_txt get_station_txt get_tec_txt get_tmp_txt get_usm_txt
Getting parameter values from xml filesget_param_xml
Getting plants number per usm for all usms or selected from a usm name vectorget_plants_nb
Extracting data from the STICS report fileget_report_results
Load and format STICS daily output file(s)get_sim
Get the soil names for an usms.xml or sols.xml fileget_soils_list
Get the compatible STICS versionsget_stics_versions_compat
Getting usms names list for an usms.xml fileget_usms_list
Find STICS output variable names and descriptionget_var_info
Get desired STICS outputsget_varmod
Extracting a data.frame of parameters values for an xml file or a set of (whatever the xml file kind)get_xml_files_param_df
Evaluating if the OS is a Mac OS typeis_mac
Search if a STICS parameter existis_stics_param
Search if a STICS variable existis_stics_var
Evaluating if the OS is a unix like typeis_unix
Evaluating if the OS is a windows typeis_windows
Getting parameters data from tables files (Excel sheet, csv)read_params_table
Set (replace) STICS input file parametersset_general_txt set_ini_txt set_param_txt set_plant_txt set_soil_txt set_station_txt set_tec_txt set_tmp_txt set_usm_txt
Setting parameter values into xml filesset_param_xml
Upgrade _ini.xml file(s) to a next major versionupgrade_ini_xml
Upgrade a param_gen.xml file to a next major versionupgrade_param_gen_xml
Upgrade a param_newform.xml file to a next major versionupgrade_param_newform_xml
Upgrade _plt.xml file(s) to a next major versionupgrade_plt_xml
Upgrade a sols.xml file to a next major versionupgrade_sols_xml
Upgrade _sta.xml file(s) to a next major versionupgrade_sta_xml
Upgrade _tec.xml file(s) to a next major versionupgrade_tec_xml
Upgrade a usms.xml file to a next major versionupgrade_usms_xml
Upgrade a Javastics STICS xml workspace directory to a next major versionupgrade_workspace_xml