R/filter.season.r

Defines functions filter.season

  filter.season = function( x, period, index=T ) {
    if      (period=="summer") { 
      i = which( (x>150) & (x<250) )
    } else if (period=="spring") {
      i = which(  x<149 )
    } else if (period=="winter") {
      i = which(  x>251 )
    } else  {
      i = c(1:length(x))
    }
    
    if (!index) i = x[i] 
    return (i)

  }
jae0/snowcrab documentation built on Nov. 6, 2024, 10:13 p.m.