Learn R Programming

RSEIS (version 4.1-1)

getPDEcsv: Unpack PDE file

Description

Unpack PDE file as CSV file or ascii screen dump

Usage

getPDEcsv(pde = "/home/lees/Site/Santiaguito/pdq.eqs")
getPDEscreen(pde = "/home/lees/Site/Santiaguito/pdq.eqs")

Value

list of locations, times and magnitude

Arguments

pde

character, file name

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

Download pde from: http://neic.usgs.gov/neis/epic/epic.html. csv version uses comma separated values. screen versions uses the screen dump and a parser

References

http://neic.usgs.gov/neis/epic/epic.html

Examples

Run this code

if (FALSE) {


eq1 <- getPDEcsv(pde = "/home/lees/Site/Santiaguito/pdq.eqs")

############################ 
######  copy/paste  from the screen dump at the NEIC web site
#####  then:
eq1 <- getPDEscreen(pde = "EQS.txt")

nk <- names(eq1[[1]])
k <- length(nk)

##########   get a matrix of values instead
jim <-  matrix( unlist(eq1), ncol=k, byrow=TRUE)
colnames(jim) <- nk



}


Run the code above in your browser using DataLab