run_javastics: Running one or several usms from a javastics workspace

View source: R/run_javastics.R

run_javasticsR Documentation

Running one or several usms from a javastics workspace

Description

This function uses basically Stics through his JavaStics command line interface

Usage

run_javastics(
  javastics,
  workspace = NULL,
  usm = NULL,
  keep_history = TRUE,
  optim = FALSE,
  verbose = TRUE,
  stics_exe = "modulostics",
  java_cmd = "java",
  javastics_path = lifecycle::deprecated(),
  workspace_path = lifecycle::deprecated(),
  usms_list = lifecycle::deprecated()
)

Arguments

javastics

Path of JavaStics

workspace

Path of a JavaStics workspace

usm

Vector of USM names. Optional, if provided, the function runs only the given USMs. If not provided, the function runs all the USMs included in workspace.

keep_history

Logical value (optional) to keep a copy of history file use TRUE (default), FALSE otherwise

optim

Logical value (optional), TRUE to force code_optim value to 1, FALSE otherwise (default)

verbose

Logical value for displaying information while running

stics_exe

The name, executable or path of the stics executable to use (optional, default to "modulostics", see details)

java_cmd

The java virtual machine command name or executable path

javastics_path

[Deprecated] javastics_path is no longer supported, use javastics instead.

workspace_path

[Deprecated] workspace_path is no longer supported, use workspace instead.

usms_list

[Deprecated] usms_list is no longer supported, use usm instead.

Details

stics_exe may be :

  1. a model name pointing to a stics executable as done in JavaStics, e.g. "modulostics" for stics_modulo.exe, the standard version of the model shipping with JavaStics;

  2. a stics executable file available from the bin folder in JavaStics, e.g. "stics_modulo.exe";

  3. a path to a stics executable file, eg. "C:/Users/username/Desktop/stics.exe". NB: this file cannot be named stics_modulo.exe because it is the name of the standard STICS shipping with JavaStics (overwriting is not allowed).

Value

A list in which each element contains: usm "name", "error" status (logical) and an output "message" (JavaStics commandline execution output)

Examples

## Not run: 
run_javastics("/path/to/JavaSTICS/folder", "example")
run_javastics("/path/to/JavaSTICS/folder", "/path/to/workspace")
run_javastics("/path/to/JavaSTICS/folder", "example", c("wheat", "pea"))
run_javastics("/path/to/JavaSTICS/folder", usm = c("wheat", "pea"))
run_javastics("/path/to/JavaSTICS/folder",
usm = c("wheat", "pea"), optim = TRUE)

## End(Not run)


SticsRPacks/SticsOnR documentation built on April 19, 2024, 9:47 p.m.