Using R, I am trying to graphically analyze a predator-prey interaction, with a Holling's Type IV functional response, using predator prey isoclines.

This is the script I am using:

library(deSolve) library(phaseR) model.LV <- function(t, y, parameters){ with(as.list(parameters),{ N<-y[1] P<-y[2] dN <- r*N*(1-N/K)-(1.511*N/((N^2/9.2724)+N+1.483))*P*N dP <- -b*P+(1.511*N/((N^2/9.2724)+N+1.483))*a*P*N list(c(dN,dP)) }) } params.LV<-c(r=0.8,K=10,b=4.2,a=6) data.LV<-as.data.frame(lsoda(c(N=3,P=3),seq(1,100,by=0.5), model.LV, params.LV)) plot(data.LV$N, data.LV$P, type="l", col="blue", main="Trajectory for Type-IV Functional Response", xlab="Prey density N", ylab="Predator density P", xlim=c(0,5), ylim=c(0,5)) nullclines(model.LV, x.lim=c(0,5),y.lim=c(0,5), parameters=params.LV, system="two.dim", colour=c("green","red"), add=TRUE) 

The isocline should have a parabola with two vertical lines intersecting it, but the graphic is completely wrong. Can this simulation be ran in R? I've seen it done in MATLAB, and was told that R is probably not powerful enough to run this simulation.

Thank you.

3

Related questions 1 Predator-Prey Modelling in MATLAB 3 MATLAB - Curves of Pursuit (Predator/Prey) 3 Correct use of deSolve in ecological modelling of a predator prey system Related questions 1 Predator-Prey Modelling in MATLAB 3 MATLAB - Curves of Pursuit (Predator/Prey) 3 Correct use of deSolve in ecological modelling of a predator prey system 0 How to estimate mle in functional response 16 QR code, can be generated with R? Load 2 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.