infoDB | R Documentation |
Print information about the seismic database
infoDB(DB, verbose=TRUE)
DB |
Database list |
verbose |
logical, print information to screen, default=TRUE |
list(
usta |
Unique station names |
ucomp |
Unique component names |
start |
starting date |
end |
ending date |
Jonathan M. Lees<jonathan.lees@unc.edu>
makeDB
########## to illustrate, we make a set of individual seismograms
data(GH)
L1 = length(GH$JSTR)
DD = data.frame(GH$info)
GIVE = vector(mode='list')
for(i in 1:L1)
{
AA = DD[i,]
GIVE[[i]] = list(fn = AA$fn, sta =GH$STNS[i] , comp = GH$COMP[i],
dt = AA$dt, DATTIM = AA, N = AA$n1, units = NA,
coords = NA, amp = GH$JSTR[[i]] )
}
########### save the seismic data in a temporary directory
#### each trace in a separate file
tdir = tempdir()
for(i in 1:length(GIVE) )
{
sig = GIVE[[i]]
d1 = dateStamp(sig$DATTIM, sep='_')
nam1 = paste(d1,sig$sta, sig$comp, sep='_')
nam2 = paste0(nam1, '.RDS')
nam3 = paste(tdir, nam2, sep='/')
saveRDS(file=nam3, sig)
}
######################## Now read files and make the DataBase:
LF = list.files(path=tdir, pattern='.RDS', full.names=TRUE)
DB = FmakeDB(LF, kind=-1)
IDB = infoDB(DB)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.