R/hump.r

Defines functions hump

Documented in hump

hump <- function(x, span, max.size=5000) {
  if (max.size%%1!=0 || max.size<=0) {
    stop("Equilibrium population size must be a postive integer")
  }
  return(max.size*(cos(2*pi*x/span-pi)+1)/2)
}

Try the seedy package in your browser

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

seedy documentation built on May 29, 2017, 10:58 a.m.