gen_usms_xml2txt: Generating one or several usms directories from a javastics...

View source: R/gen_usms_xml2txt.R

gen_usms_xml2txtR Documentation

Generating one or several usms directories from a javastics workspace content

Description

The function creates sets of input files for one or multiple usms from usms data stored in a JavaSTICS workspace. For multiple usms, sets will be generated into individual folders named with usm names. Observations files will be also copied if they are named ⁠[usm_name].obs⁠ For one usm, files will be generated either in the workspace directory or in a subdirectory.

Usage

gen_usms_xml2txt(
  javastics,
  workspace = NULL,
  out_dir = NULL,
  usm = c(),
  verbose = TRUE,
  dir_per_usm_flag = TRUE,
  check = TRUE,
  java_cmd = "java",
  javastics_path = lifecycle::deprecated(),
  workspace_path = lifecycle::deprecated(),
  target_path = lifecycle::deprecated(),
  usms_list = lifecycle::deprecated(),
  check_files = lifecycle::deprecated()
)

Arguments

javastics

Path of JavaSTICS.

workspace

Path of a JavaSTICS workspace (i.e. containing the STICS XML input files). Optional, if not provided the current workspace stored in JavaSTICS preferences will be used.

out_dir

The path of the directory where to create usms directories (Optional), if not provided the JavaSTICS workspace will be used as root

usm

List of usms to generate (Optional). If not provided, all usms contained in workspace_path/usms.xml file will be generated.

verbose

Logical value for displaying information while running

dir_per_usm_flag

logical, TRUE if one want to create one directory per USM, FALSE if USM files are generated in the target_path (only useful for usms_list of size one)

check

Logical, TRUE to check if usms files exist, FALSE otherwise

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.

target_path

[Deprecated] target_path is no longer supported, use out_dir instead.

usms_list

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

check_files

[Deprecated] check_files is no longer supported, use check instead.

Value

A list with named elements: usms_path : created directories paths (for storing STICS input files), files : generated files list (in JavaSTICS workspace origin), copy_status : logical value vector, indicating if all files have been generated for each usm obs_copy_status : logical value vector, indicating if observation files have been successfully copied in usms directories

Examples

## Not run: 
javastics <- "/path/to/JavaSTICS/folder"
workspace <- "/path/to/workspace"

# For all usms
gen_usms_xml2txt(javastics, workspace)

# For an usms list
usm <- c("usm1", "usm2")
gen_usms_xml2txt(javastics, workspace, usm)


## End(Not run)


SticsRFiles documentation built on July 26, 2023, 5:48 p.m.