#Example 1 volrec=function (x,y,z) { vol=x*y*z return(vol) } #Example 2 ricker=function(nzero, r, K=1, time=100, from=0, to=time) { N=numeric(time+1) N[1]=nzero for (i in 1:time) N[i+1]=N[i]*exp(r*(1-N[i]/K)) Time=0:time plot(Time, N,type="l",xlim=c(from,to)) } layout(matrix(1:3,3,1)) ricker(0.1,1);title("r = 1") ricker(0.1,2);title("r = 2") ricker(0.1,3);title("r = 3")