Learn R Programming

IRISMustangMetrics (version 1.0.0)

metricList2Xml: Create XML for the BSS

Description

The metricList2Xml function converts a list of SingleValueMetrics into an XML structure appropriate for submitting to the MUSTANG Backend Storage System (BSS).

Usage

metricList2Xml(metricList)

Arguments

metricList
a list of SingleValueMetric objects

Value

  • A character string with BSS formatted XML is returned.

Details

Metrics functions return lists of SingleValueMetric objects. A long metricList may be built up by appending the results of different metrics functions or the same metrics function operating on different seismic signals. These metrics can be submitted to the BSS in a standardized XML format. (see SingleValueMetric-class)

Examples

Run this code
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")

# Get the waveform
starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")
st <- getDataselect(iris,"AK","PIN","","VEA",starttime,endtime)

# Apply a metric and show the results
metricList <- stateOfHealthMetric(st)
metricList <- append(metricList, basicStatsMetric(st))
bssXml <- metricList2Xml(metricList)

Run the code above in your browser using DataLab