Skip to contents

RSMinerve writes result files or performs plots for a selection of variables. This selection can be stored in and loaded to RSMInerve from a chk file. The function readSelectionCHK reads such a file to a tibble.

Usage

readSelectionCHK(filepath)

Arguments

filepath

Path to file to be read.

Value

A list with the name of the selection and the content of the Paths in the chk file as a tibble.

Details

The chk file is structured as shown in the following example:
<?xml version="1.0" encoding="utf-8"?>
<Selection>
<Name>New selection</Name>
<Path>Model Koksu\Source QSpring\Kichkinesay - QUp (m3/s)</Path>
<Path>Model Koksu\Comparator Comparator 1\QReference (m3/s)</Path>
<Path>Model Koksu\Comparator Comparator 1\QSimulation (m3/s)</Path>
...
The content of the Path parts is parsed to a tibble with columns Model, Object, ID and Variable. The output tibble of the example above would be:
A tibble: 94 x 3
Model Object Variable
<chr> <chr> <chr>
Model Koksu Source QSpring Kichkinesay - QUp (m3/s)
Model Koksu Comparator Comparator 1 QReference (m3/s)
Model Koksu Comparator Comparator 1 QSimulation (m3/s)
... ... ...

Examples

if (FALSE) {
filepath <- normalizePath(file.path("test_selection.chk"))
selection_list <- readSelectionCHK(filepath)
selection_name <- selection_list[[1]]
selection_data <- selection_list[[2]]
}