R/gen_usms_xml2txt.R
gen_usms_xml2txt.Rd
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.
gen_usms_xml2txt(
javastics = NULL,
workspace = NULL,
out_dir = NULL,
usm = c(),
stics_version = "latest",
verbose = TRUE,
dir_per_usm_flag = TRUE,
java_cmd = "java",
java_converter = FALSE,
javastics_path = lifecycle::deprecated(),
workspace_path = lifecycle::deprecated(),
target_path = lifecycle::deprecated(),
usms_list = lifecycle::deprecated()
)
Path of JavaSTICS. Optional (needed if the JavaSTICS converter is used, java_converter set to TRUE in inputs)
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.
The path of the directory where to create usms directories (Optional), if not provided the JavaSTICS workspace will be used as root
List of usms to generate (Optional). If not provided, all usms contained in workspace/usms.xml file will be generated.
the STICS files version to use (optional, default to latest).
Logical value for displaying information while running
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)
For unix like systems, the java virtual machine command name or executable path. Usefull only if the JavaSTICS command line is used for generating files. "java" is the default system command, but a full path to a java executable (other than the default one) may be given
logical TRUE for using JavaStics command (a JavaSTICS path must be set in the function inputs), FALSE otherwise
javastics_path
is no longer supported, use javastics
instead.
workspace_path
is no longer supported, use workspace
instead.
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
if (FALSE) { # \dontrun{
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)
} # }