R/filter.season.r

Defines functions filter.season

filter.season = function( x, period, index=TRUE ) {
  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/aegis documentation built on April 4, 2024, 2:40 p.m.