UNR Logo

Rpplane

Graphical phase plane analysis of planar systems of ODEs in R.

Paul Hurtado
Download:  Rpplane.R (v1.3, updated 06-10-2025).

Older versions (mostly old, buggy code): Rpplane-v0.1.R; Rpplane-v0.2.R; Rpplane-v1.0.R; Rpplane-v1.1.R; Rpplane-v1.2.R (25-09-2025).

Rpplane is an R version of pplane for matlab adapted from matlab code by Daniel Kaplan (Mcalester College), and later John Polking (Rice), Joel Castellanos (University of New Mexico) and others. This R version was created by Stephen P. Ellner (Cornell University) during the late 2000s for use in the classroom and to go along with his 2006 book co-authored with J. Guckenheimer. I have since modified that code and implemented a GUI as a shiny app in R for my own teaching purposes, with no real efforts to maintain close consistency with the matlab or other versions.

To launch Rpplane: Run the contents of the script Rpplane.R then launch the GUI by running shinyApp(ui=ui, server=server) in the console.

Some day I'll write documentation for both the GUI/shiny version and command-line functions, but until then, know that you CAN use the functions in the first half of the Rpplane.R script to write R code that make figures without using the GUI (it may or may not be helpful to find an online PDF copy of the manual "Ordinary Differential Equations using MATLAB" by John Polking, but it is no longer available on his website https://math.rice.edu/~polking/). Running the GUI should be straightforward, and the interface should be self-explanitory.

Please let me know if you find bugs, or have suggestions for cleaning up the code, or if you have any feature requests.

Alternatives: In R, the phaseR package was very similar, but as of 9/2025 is no longer being updated. You can still install it and launch it from CRAN archives with the commands:

install.packages("https://cran.r-project.org/src/contrib/Archive/phaseR/phaseR_2.2.1.tar.gz");
library(phaseR);
vignette("introduction", package = "phaseR")
.

Python: Check out github.com/klim-/pyplane or github.com/m-squared96/PyPLANE.

Matlab & Java: You can get dfield and pplane (by Polking, Arnold, & Castellanos) for both matlab and java from Joel Castellano's website www.cs.unm.edu/~joel/dfield/, and pplane for matlab is also online at www.mathworks.com/matlabcentral/fileexchange/61636-pplane.