HGSQueryBlocks | R Documentation |
When HGS is run, the user requests output at specific solution times for key data from the model. For each requested time, there is a block of data in the output file. This command displays critical descriptors for each block of data.
HGSQueryBlocks(HGSFile, descriptors = NULL)
HGSFile |
An S3 object of class "HGSFile" created by calling
|
descriptors |
Either NULL, or a character vector of descriptor names. See documentation of return value, below. |
When descriptors
is NULL
, return value is a list
of
descriptor names available for each block. When descriptors
is a single
descriptor name, return value will be a list of values, one value for each
block. When descriptors
is a vector of more than one descriptor name,
the return value is a list
of lists
of descriptor values.
HGSF <- HGSFile("a_File_Name.pm.dat") # requires name of a legetimate pm file
# returns the names of the information in each query block
HGSQueryBlocks(HGSF)
# returns the simulation time for each block
HGSQueryBlocks(HGSF, "SOLUTIONTIME")
# returns the simulation times for each simulation block followed by the variable locations for each simulation block
HGSQueryBlocks(HGSF, c("SOLUTIONTIME", "VARLOCATION"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.