R/RfPhiParRead.R

Defines functions RfPhiParRead

Documented in RfPhiParRead

RfPhiParRead <-
function(rfphi.file){
  my.par <- read.table(file = rfphi.file, header = TRUE, sep = '\t')
  names(my.par) <- c("m.majoraxis", "m.minoraxis", "m.rake.deg")
  my.par$m.eccentricity <- sqrt(1 - (my.par$m.minoraxis^2 / my.par$m.majoraxis^2))
  my.par$m.rake.rad <- my.par$m.rake.deg * (pi / 180)
  my.par$m.ratio <- my.par$m.majoraxis / my.par$m.minoraxis
  my.par$m.area <- pi * (my.par$m.majoraxis / 2) * (my.par$m.minoraxis / 2)
  return(my.par)
}

Try the RockFab package in your browser

Any scripts or data that you put into this service are public.

RockFab documentation built on June 23, 2022, 9:11 a.m.