R/recode.time.maturity.r

Defines functions recode.time.maturity

recode.time.maturity = function( x, time.resolution="daily" ) {
  if (time.resolution == "daily" ) {
    zz = 1
  } else if( time.resolution == "weekly" ) {
    zz = 52/365
  } else if( time.resolution == "monthly" ) {
    zz = 12/365
  }
  x = round( x * zz )
  return(x)
}
jae0/bio.snowcrab documentation built on Nov. 6, 2024, 10:10 p.m.