Learn R Programming

RSEIS (version 2.4-5)

parseFN2STA: get station from file name

Description

station and component are assumed to be the last elements of a file name - this function returns a list with these text strings.

Usage

parseFN2STA(fn, ista, icomp, sep="\\."  )

Arguments

fn
text file name
ista
index of station name counting from the end of the file name
icomp
index of station name counting from the end of the file name
sep
seperator token in file name

Value

  • list(sta='text station name', comp='compname')

Details

Some format store the station in the file name rather than the seismic header. Default assumes that the station name and the component name are the last items on the file name seperated by a period. So ista and icomp are computed from the end of the file name, i.e. ista=1 and icomp=0.

Examples

Run this code
parseFN2STA('/data/wadati/bourbon/GUATEMALA/SEGY/R009.01/07.009.22.25.34.CAS.E')

Run the code above in your browser using DataLab