STICS GROWTH MODEL: INSTALLATION

STICS GROWTH MODEL: INSTALLATION

The summary of this step is that there is good documentation for the installation of STICS and SticsOnR already.

  • STICS: INRAE (registration required)
  • SticsOnR: Github

SticsOnR & SITCS ON LINUX

As noted, the documentation is already good. This is just some notes (mainly to self) about my experience with the installation of STICS and SticsOnR on a Linux (Ubuntu) system. My aim is to use STICS through R as a means of running a large number of simulations easily.

STICS

There isn’t really any installation of STICS when accessing it from R. Just download it from INRAE. I’m using STICS 10.1.1, JavaSTICS 1.5.2. This meant that I needed to upgrade Java from v11 (LTS) to v17 (LTS).

sudo apt install openjdk-17-jdk

SticsOnR

First, use the ReadMe in the repository, not the description at https://sticsrpacks.github.io/SticsOnR/ : this has missing text in the code snippets.

Then, in RStudio:

I needed to install devtools to allow me to install from GitHub (From RStudio)

install.packages("devtools")

Install SticksRPacks (the system that includes everything you need for running STICS from R) from GitHub (from RStudio):

devtools::install_github("SticsRPacks/SticsRPacks")

This told me that I needed to install CMake to the workstation (from terminal) …

sudo apt install cmake

… and, as suggested in the ReadMe, that I also needed to install xslt to the workstation (from terminal)

sudo apt install libxslt1-dev

From there, when I ran the install.packages for SticsRPacks, it installed without error and the tests defined in the ReadMe all worked.

One thing that was not described in the ReadMe but which is given as a variable for R is output_path. There is a link to the page describing how this variable is used. This is the path to a directory; a directory in which all the STICS files are kept once you run the process that transforms STICS XML files to STICS text files. That is, all the STICS files in the example directory that comes with the STICS download are in XML format and need to be transformed to text files for the R commands run_stics and stics_wrapper to work. The R command run_javastics uses the XML files.

The STICS XML to STICS text transformation uses the SticsRFiles::gen_usms_xml2txt command. Any command in the ReadMe that uses the output_path variable will need this process to have been run.

Happy modelling!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.