You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/landscape-of-ode-solvers-in-r/index.md
+21-39Lines changed: 21 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,34 +26,33 @@ tags:
26
26
---
27
27

28
28
29
-
Solving **ordinary differential equations (ODEs)** is a common task in many fields, including systems biology, pharmacometrics, and engineering. The R ecosystem offers a collection of tools for this purpose: from lightweight numerical solvers to full modeling frameworks.
29
+
Solving **ordinary differential equations (ODEs)** is a common task in many fields, including systems biology, pharmacometrics, physics, and engineering. The R ecosystem offers a collection of tools for this purpose: from lightweight numerical solvers to full modeling frameworks.
30
30
31
31
This article provides **a practical overview of ODE solvers in R**, with a focus on helping users navigate the ecosystem and choose appropriate tools.
32
32
33
-
All packages here was tested with simple examples and the code was published in the [GitHub repository](https://github.com/metelkin/ode-solvers-in-r).
33
+
All packages included here were tested with simple examples and the code was published in the [GitHub repository](https://github.com/metelkin/ode-solvers-in-r).
34
34
35
35
## What is included
36
36
37
-
We include tools that:
37
+
We include R packages that:
38
38
39
-
- Provide an API for R
40
39
- Support solving general ODE systems
41
40
- Are mentioned in literature, documentation, or community discussions
42
41
43
42
We intentionally exclude:
44
43
45
-
- Deprecated or archived packages (e.g., RxODE)
46
-
- Thin wrappers around other frameworks without original solvers or formats (e.g., nlmixr2)
44
+
- Deprecated or archived packages
45
+
- Thin wrappers around other frameworks without original solvers or formats
47
46
- Small helper packages
48
-
-Highly specialized tools limited to narrow domains
47
+
-Proprietary tools with limited public documentation
49
48
50
49
Some tools included in this review go beyond ODE solving and provide additional capabilities such as parameter estimation or simulation workflows. We include them for completeness, without going into those advanced features.
51
50
52
51
## Packages overview table
53
52
54
53
<divclass="table-h-scroll">
55
54
56
-
| Package | Engine | Solver type | Algorithms | Model format | Stiff | DAE | DDE | Time events | Conditional events |CRAN (2025) |
55
+
| Package | Engine | Solver type | Algorithms | Model format | Stiff | DAE | DDE | Time events | Conditional events |Downloads (2025) |
@@ -75,10 +74,10 @@ Some tools included in this review go beyond ODE solving and provide additional
75
74
#### Engine
76
75
77
76
This refers to the underlying numerical implementation used by the package. This can be:
78
-
- a well-known external library (e.g., ODEPACK),
79
-
- a custom compiled implementation,
80
-
-or an external runtime (e.g., Julia),
81
-
-another R package.
77
+
- a well-known external library (e.g., ODEPACK)
78
+
- a custom compiled implementation
79
+
-another R package
80
+
-or an external runtime (e.g., another language)
82
81
83
82
#### Solver type
84
83
@@ -117,9 +116,9 @@ These features are important for modeling real-world systems with discontinuitie
117
116
-**Time events**: Discrete changes applied at predefined time points (e.g., dosing events).
118
117
-**Conditional events**: Events triggered when a condition is met during simulation (e.g., threshold crossing).
119
118
120
-
#### CRAN 2025
119
+
#### Downloads 2025
121
120
122
-
Total number of downloads in 2025, reflecting usage statistics. Calculated with [CRAN logs](https://cranlogs.r-pkg.org/) service.
121
+
Total number of downloads in 2025 from CRAN, reflecting usage statistics. Calculated with [CRAN logs](https://cranlogs.r-pkg.org/).
123
122
124
123
## Repository and test cases
125
124
@@ -203,36 +202,19 @@ The goal of this review was to provide **a maximally complete and objective over
203
202
204
203
Many aspects - such as computational performance, numerical accuracy, and advanced functionality - are intentionally not covered in this article.
205
204
206
-
The table includes popularity metrics as download counts. However, these numbers do not reflect the actual capabilities of the packages. Downloads may include one-time installations for educational purposes, CI/CD workflows, or usage of a package for non-ODE problems. Therefore, they should not be considered a deciding factor when choosing a tool, but rather as a rough indicator of visibility within the community.
207
-
208
-
Below is a subjective selection of packages that I would recommend paying attention to.
209
-
210
-
#### General-purpose solution: deSolve
211
-
212
-
[deSolve](https://cran.r-project.org/package=deSolve) is a robust and well-established package with broad functionality and support for multiple numerical methods. It provides advanced capabilities such as handling stiffness, DAEs, DDEs, and events, while maintaining good computational performance through compiled solvers and model interfaces. It also offers flexible ways to define models.
213
-
214
-
With a large user base and extensive documentation, it is a reliable default choice.
205
+
Many packages designed for specific application areas (e.g., PK/PD) can also be used to solve general ODE systems. These are included here on equal footing, without focusing on their domain-specific features.
215
206
216
-
I would recommend it as a general-purpose tool for most ODE tasks in R. If you are new to ODE modeling in R, starting with deSolve is a safe and practical choice before exploring more specialized tools.
217
-
218
-
#### Domain-specific tool: rxode2
219
-
220
-
[rxode2](https://cran.r-project.org/package=rxode2) is a powerful tool designed for pharmacokinetics and pharmacodynamics (PK/PD).
221
-
222
-
Together with the [nlmixr2](https://nlmixr2.org/) toolkit, it extends beyond ODE solving to include parameter estimation from data and efficient Monte Carlo simulations in parallel and distributed environments.
223
-
224
-
If your work is related to PK/PD modeling, this can be an excellent choice.
207
+
The table includes popularity metrics as download counts. However, these numbers do not reflect the actual capabilities of the packages. Downloads may include one-time installations for educational purposes, CI/CD workflows, or usage of a package for non-ODE problems. Therefore, they should not be considered a deciding factor when choosing a tool, but rather as a rough indicator of visibility within the community.
225
208
226
-
#### Underappreciated tool: dMod
209
+
For a broader catalogue, see the [CRAN Task View: Differential Equations](https://cran.r-project.org/web/views/DifferentialEquations.html), which also covers SDEs, DDEs, DAEs, PDEs, boundary value problems, calibration tools, and related modeling packages. The present review is narrower and more practical: it focuses on packages that can be used to solve general ODE systems in R and provides tested examples for each included tool.
227
210
228
-
[dMod](https://cran.r-project.org/package=dMod) provides a powerful framework for dynamic modeling, parameter estimation, and identifiability analysis.
211
+
### deSolve
229
212
230
-
It combines symbolic model definition with efficient numerical solvers and supports gradient-based optimization workflows. While it has a steeper learning curve compared to simpler solvers, it offers a high level of flexibility and is particularly useful for more advanced modeling tasks.
213
+
[deSolve](https://cran.r-project.org/package=deSolve) is one of the most widely used and established ODE packages in R. Its central role in the ecosystem is reflected not only in its large user base, but also in the number of other packages that build on top of it.
231
214
232
-
Despite its capabilities, it appears to be less widely used, making it an interesting but often overlooked option.
215
+
It provides a broad set of numerical methods and supports a wide range of problem types, including stiff systems, DAEs, DDEs, and event handling. At the same time, it offers flexible model definitions, from simple R functions to compiled code.
233
216
234
-
#### Bridge to high-performance: diffeqr
217
+
Overall, deSolve can be seen as a foundational tool in the R ecosystem for differential equations. Its popularity is well justified by its versatility, stability, and long-term development. If you are new to ODE modeling in R, starting with deSolve is a safe and practical choice before exploring more specialized tools.
235
218
236
-
[diffeqr](https://cran.r-project.org/package=diffeqr) provides an interface to the Julia-based DifferentialEquations.jl ecosystem, exposing a large collection of state-of-the-art solvers directly in R.
219
+
### Model formats
237
220
238
-
Rather than implementing its own numerical methods, it delegates computation to Julia, allowing access to advanced algorithms, GPU acceleration, and high-performance execution that are often beyond native R tools.
0 commit comments