bifurcation  R Documentation 
bifurcation
bifurcation(model, state, parms, resume = TRUE, ...)
model 
(function, required) An Rfunction that computes the values of the derivatives in the ODE system (the model definition) at time t. The model must be defined as: model < function(t, state, parms), where t is the current time point in the integration, state is the current value of the variables in the ODE #' system and parms is a vector or list of parameters. The return value of func should be a list, whose first and single element is a vector containing the derivatives of y with respect to time. The derivatives must be specified in the same order as the state variables state. The vector state and parms should both have name attributes for all their elements 
state 
(numeric vector, required) The initial (state) values for the ODE system. This vector should have name attributes for all its elements 
parms 
(numeric vector, required) The values of the parameters in the ODE system. This vector should have name attributes for all its elements 
resume 
(boolean, optional) If TRUE the program will try to load the curves computed during the last session from the global variable '<model>BifCurves' and try to restore the numerical and plot settings by importing them from the global variable '<model>BifSettings', where the substring '<model>' is the name of the function describing the dynamics, which is passed as first argument to 'bifurcation()'. The program saves the curves computed during a session and the numerical and plot settings of this last session in these global variables '<model>BifCurves' and '<model>BifSettings'. 
... 
(optional arguments) Additional arguments that can be included at the command line to tweak graphical default values used by the application. Valid arguments are:

bifurcation(model, state, parms, resume = TRUE, ...)
None.
if(interactive()){
# The initial state of the system has to be specified as a named vector of state values.
state < c(R=1, N=0.01)
# Parameters has to be specified as a named vector of parameters.
parms < c(r=1, K=1, a=1, c=1, delta=0.5)
# The model has to be specified as a function that returns
# the derivatives as a list.
model < function(t, state, parms) {
with(as.list(c(state,parms)), {
dR < r*R*(1  R/K)  a*R*N
dN < c*a*R*N  delta*N
# The order of the derivatives in the returned list has to be
# identical to the order of the state variables contained in
# the argument "state"
return(list(c(dR, dN)))
})
}
bifurcation(model, state, parms)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.