View source: R/readSelectionCHK.R
readSelectionCHK | R Documentation |
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.
readSelectionCHK(filepath)
filepath |
Path to file to be read. |
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)
... ... ...
A list with the name of the selection and the content of the Paths in the chk file as a tibble.
Other RS Minerve IO:
getChunkSize()
,
load_minerve_input_csv()
,
readDBCSV()
,
readForcingCSV()
,
readForcingSTR()
,
readRSMParameters()
,
readResultCSV()
,
readResultDST()
,
translateCSVtoDST()
,
writeRSMParameters()
,
writeSelectionCHK()
## Not run: filepath <- normalizePath(file.path("test_selection.chk")) selection_list <- readSelectionCHK(filepath) selection_name <- selection_list[[1]] selection_data <- selection_list[[2]] ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.