For those interested in exploring computational physics using R, I have created S4 classes from the ODE solvers available in OSP. Not intended for speed but learning R, S4 classes or how the algorithms were implemented without the Java internals get in the way. The package also includes the classic examples such as FallingParticle, Pendulum, Kepler, Planet, Reaction and others available in Matlab.

The package is now available in CRAN and be installed from any R environment such as RStudio.

For those interested in collaborating, the GitHub link is: https://github.com/AlfonsoRReyes/rODE

Alfonso R. Reyes Houston, Texas

Package Information: Package: rODE Version: 0.99.4 Title: Ordinary Differential Equation (ODE) Solvers Written in R Using S4 Classes Author(s): Alfonso R. Reyes Maintainer: Alfonso R. Reyes Depends: R (>= 3.3.0) Suggests: knitr, testthat, rmarkdown, ggplot2, dplyr, tidyr Description: Show Physics and engineering students how an ODE solver is made and how effective classes can be for the construction of the equations that describe how effective classes can be for the construction of equations that describe the natural phenomena. Most of the ideas come from the book on "Computer Simulations in Physics" by Harvey Gould, Jan Tobochnik, and Wolfgang Christian. Book link: . License: GPL-2 Imports: methods, data.table

Re: Re: rODE v0.99.4 with OSP flavor just released -

Alfonso R. Reyes
9 Posts

Hello, this R package contains some examples from OSP as well as some classes for ODE solvers. It is intended as a learning tools for anyone wanting to do data science on the models and simulations. It is not aimed at competing with Java OSP or EJS, firstly because of speed. If anyone wants to learn how different are Java classes to R classes with functional programming this is the right spot to start.

I tried to use the original Java OSP for the simulations in R with rJava package but with an inconvenience: it crashes R after the simulation finishes. I asked for help in StackOverflow. It would probably require someone with enough expertise in Java and R to find the fix. But I can run the real time plots from R. With more effort by someone in the community we could have writing and reading back and forth between OSP and R.

To run this package you need to install R and then install the package with install.package("rODE"). It will help you greatly if you also install RStudio as well.

The cool thing about R,- in my case-, is that I can run any C, C++, Fortran or Java library, and compiling it from the R interface. There are very good packages in R (using as backbone the low level languages), for linear algebra, physics, bioengineering, biogenetics, artificial intelligence, machine learning, neural networks, etc.