# Open a connection to EarthScope webservices (including the BSS)
iris <- new("IrisClient", debug=TRUE)
starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")
# Get the measurement XML
xml <- tryCatch(getMetricsXml(iris,"AK","PIN","","BHZ",
starttime,endtime,metricName="sample_mean",
url="https://service.earthscope.org/mustang/measurements/1/query?"),
error= function(e) {message(e)})
Run the code above in your browser using DataLab