R/PL_Abs2SqMeter.R

PL_Abs2SqMeter <- function(var_in, start_depth, end_depth, split_fraction, volume) {
  
  # Function for converting absolute quantities to per unit are basis based on
  # sample parameters.
  #
  # Input: var_in : variable to convert - numeric array
  #        start_depth : tow start depth - numeric array
  #        end_depth : tow end depth - numeric array
  #        split_fraction : sample split fraction - numeric array
  #        volume : tow filtered volume - numeric array
  #
  # Output: var_out : converted variable (e.g in #/m2) - numeric array
  #
  # Last update: 20141015
  # Benoit.Casault@dfo-mpo.gc.ca
  
  var_out <- var_in*abs(start_depth-end_depth)/split_fraction/volume
  
  return(var_out)
}
jae0/stmdat documentation built on May 28, 2019, 11 p.m.