# Open a connection to IRIS DMC 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="http://service.iris.edu/mustang/measurements/1/query?"),
error= function(e) {message(e)})
Run the code above in your browser using DataLab