Skip to content
Development version of phaseR, an R package for phase plane analysis of one- and two-dimensional autonomous ODE systems
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Removed duplication of method specification Nov 26, 2019
inst Added CITATION file. Jun 2, 2019
man
tests
vignettes
.travis.yml Add configuration for Travis CI Nov 22, 2017
CRAN-RELEASE Added \donttest{} to several examples with longer execution time Oct 11, 2019
DESCRIPTION
LICENSE Modfiying LICENSE file Sep 10, 2019
LICENSE.md Modfiying LICENSE file Sep 10, 2019
NAMESPACE Correcting export to phasePlaneAnalsis not phasePlaneAnalyser Jun 7, 2018
NEWS.md Updated NEWS and README Nov 26, 2019
README.Rmd Updated NEWS and README Nov 26, 2019
README.md
cran-comments.md
phaseR.Rproj

README.md

phaseR

Phase plane analysis of one- and two-dimensional autonomous ODE systems

Description

phaseR provides functions to perform a qualitative analysis of one- and two-dimensional autonomous ordinary differential equation (ODE) systems, using phase plane methods. Programs are available to identify and classify equilibrium points, plot the direction field, and plot trajectories for multiple initial conditions. In the one-dimensional case, a program is also available to plot the phase portrait. Whilst in the two-dimensional case, programs are additionally available to plot nullclines and stable/unstable manifolds of saddle points. Many example systems are provided for the user.

Getting started

You can install the released version of phaseR from CRAN with:

install.packages("phaseR")

Alternatively, the latest development version available from GitHub can be installed with:

devtools::install_github("mjg211/phaseR")

An introductory example of how to make use of the package’s core functionality can be found below. More detailed support is available in the package vignette, which can be accessed with vignette("phaseR"). For further help, please contact Michael Grayling at michael.grayling@newcastle.ac.uk.

Example

As a basic example, we consider analysing the non-linear two-dimensional system of ODEs provided in phaseR via example12(). By hand, we typically first locate the nullclines and then identify the equilibrium points. Following this, we produce a plot from which trajectories can be sketched. This can all be seamlessly carried out in phaseR with:

example12_flowField   <- flowField(example12,
                                   xlim = c(-4, 4),
                                   ylim = c(-4, 4),
                                   add  = FALSE)
example12_nullclines  <- nullclines(example12,
                                    xlim   = c(-4, 4), 
                                    ylim   = c(-4, 4),
                                    points = 500)
y0                    <- matrix(c( 2,  2,
                                  -3,  0,
                                   0,  2,
                                   0, -3), 
                                nrow  = 4,
                                ncol  = 2,
                                byrow = TRUE)
example12_trajectory  <- trajectory(example12,
                                    y0   = y0,
                                    tlim = c(0, 10))
#> Note: col has been reset as required

It appears that both of the equilibria are unstable. We could verify this by hand, but we can also perform this analysis in phaseR using stability():

example12_stability_1 <- stability(example12,
                                   ystar = c(1, 1))
#> tr = 3, Delta = 4, discriminant = -7, classification = Unstable focus
example12_stability_2 <- stability(example12,
                                   ystar = c(-1, -1),
                                   h     = 1e-8)
#> tr = -1, Delta = -4, discriminant = 17, classification = Saddle

References

Grayling MJ (2014) phaseR: An R Package for Phase Plane Analysis of Autonomous ODE Systems. The R Journal 6(2):43-51. DOI: 10.32614/RJ-2014-023.

You can’t perform that action at this time.