View source: R/gen_usms_xml2txt.R
gen_usms_xml2txt | R Documentation |
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 of JavaSTICS. Optional (needed if the JavaSTICS converter is used, java_converter set to TRUE in inputs) |
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/usms.xml file will be generated. |
stics_version |
the STICS files version to use (optional, default to latest). |
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 out_dir (only useful for usm of size one) |
java_cmd |
For unix like systems, the java virtual machine command name or executable path. Useful 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 |
java_converter |
logical TRUE for using JavaSTICS command (a JavaSTICS path must be set in the function inputs), FALSE otherwise |
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
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.