<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Evgeny Metelkin - R posts</title>
  <subtitle>Personal website of Evgeny Metelkin, a Computational Biologist and Systems Pharmacology Architect</subtitle>
  <link href="https://metelkin.me/feed/r.xml" rel="self" />
  <link href="https://metelkin.me/" />
  <updated>2026-05-04T00:00:00Z</updated>
  <id>https://metelkin.me/</id>
  <author>
    <name>Evgeny Metelkin</name>
  </author>
  <entry>
    <title>Keep R Awake During Long Jobs with NoSleepR</title>
    <link href="https://metelkin.me/keep-r-awake/" />
    <updated>2025-11-28T00:00:00Z</updated>
    <id>https://metelkin.me/keep-r-awake/</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;https://metelkin.me/keep-r-awake/img/fig0-cover.jpg&quot; alt=&quot;Cover&quot;&gt;&lt;/p&gt;
&lt;p&gt;When R runs something heavy for an hour or two, laptops don&#39;t always care - many will still go to sleep if there&#39;s no user activity.&lt;br&gt;
On Windows with Modern Standby, on macOS with default power settings, or on Linux with aggressive power-saving policies, this can interrupt work even if R is still busy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NoSleepR&lt;/strong&gt; solves this problem with a simple idea:&lt;br&gt;
&lt;strong&gt;keep the system awake only while R is doing something important, and let it return to normal afterward.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It uses the operating system&#39;s official sleep-prevention mechanisms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Windows:&lt;/strong&gt; PowerRequest API&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;macOS:&lt;/strong&gt; &lt;code&gt;caffeinate&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux (systemd):&lt;/strong&gt; &lt;code&gt;systemd-inhibit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No hacks, no fake mouse movement, and no permanent power-plan changes.&lt;/p&gt;
&lt;h2&gt;Basic usage&lt;/h2&gt;
&lt;p&gt;Install from CRAN:&lt;/p&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;install.packages&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;NoSleepR&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;NoSleepR&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Turn sleep prevention on manually:&lt;/p&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;nosleep_on&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;# long-running R work here&lt;/span&gt;
nosleep_off&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or wrap a block:&lt;/p&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;with_nosleep&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;# heavy computation here&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If needed, keep the screen awake too:&lt;/p&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;with_nosleep&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;keep_display &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;# long-running code&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is particularly useful on Windows laptops that ignore sleep-prevention when the display turns off in battery mode.&lt;/p&gt;
&lt;h2&gt;Why this package exists&lt;/h2&gt;
&lt;p&gt;Disabling sleep mode globally works, but it&#39;s overkill:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;consumes battery even when idle,&lt;/li&gt;
&lt;li&gt;requires changing system settings (sometimes blocked by admins),&lt;/li&gt;
&lt;li&gt;easy to forget to revert.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;NoSleepR&lt;/code&gt; keeps things simple: &lt;strong&gt;only stay awake when the code runs.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your workflow calls &lt;strong&gt;C++&lt;/strong&gt;, &lt;strong&gt;Rcpp&lt;/strong&gt;, &lt;strong&gt;external binaries&lt;/strong&gt;, or other &lt;strong&gt;blocking system calls&lt;/strong&gt;, they are covered as long as R waits for them to finish.&lt;/p&gt;
&lt;h2&gt;What NoSleepR does ΝΟΤ do&lt;/h2&gt;
&lt;p&gt;Some behaviors are controlled strictly by the OS and cannot be overridden:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;closing the laptop lid forces sleep,&lt;/li&gt;
&lt;li&gt;pressing the power button forces sleep,&lt;/li&gt;
&lt;li&gt;corporate-managed policies may override PowerRequest.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On remote servers, the package does nothing: servers normally do not sleep, and remote session drops are usually network timeouts.&lt;/p&gt;
&lt;h2&gt;Practical scenarios&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;overnight simulations&lt;/li&gt;
&lt;li&gt;bootstrap or MCMC workflows&lt;/li&gt;
&lt;li&gt;machine-learning training loops&lt;/li&gt;
&lt;li&gt;ETL or data-cleaning pipelines&lt;/li&gt;
&lt;li&gt;unattended scripts on laptops with aggressive sleep policies&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the &amp;quot;YouTube tab&amp;quot; method works for you, &lt;code&gt;NoSleepR&lt;/code&gt; will work too but without wasting power or being ridiculous.&lt;/p&gt;
&lt;h2&gt;Feedback&lt;/h2&gt;
&lt;p&gt;Bug reports, suggestions, and contributions are welcome:&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/hetalang/NoSleepR&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://github.com/hetalang/NoSleepR&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This post is syndicated at &lt;a href=&quot;https://www.r-bloggers.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;R-bloggers&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Landscape of ODE Solvers in R</title>
    <link href="https://metelkin.me/landscape-of-ode-solvers-in-r/" />
    <updated>2026-05-04T00:00:00Z</updated>
    <id>https://metelkin.me/landscape-of-ode-solvers-in-r/</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;https://metelkin.me/landscape-of-ode-solvers-in-r/img/fig0-cover.png&quot; alt=&quot;Cover&quot;&gt;&lt;/p&gt;
&lt;p&gt;Solving &lt;strong&gt;ordinary differential equations (ODEs)&lt;/strong&gt; is a common task in many fields, including systems biology, pharmacometrics, physics, and engineering where dynamic systems are studied. An ODE describes how a variables evolve over time, typically written as&lt;br&gt;
$$&lt;br&gt;
&#92;begin{align}&lt;br&gt;
&#92;frac{dx_1}{dt} &amp;amp; = f_1&#92;left(t, x_1, x_2, &#92;ldots &#92;right), &#92;&#92;&lt;br&gt;
&#92;frac{dx_2}{dt} &amp;amp; = f_2&#92;left(t, x_1, x_2, &#92;ldots &#92;right), &#92;&#92;&lt;br&gt;
&#92;vdots &amp;amp; &#92;&#92;&lt;br&gt;
&#92;end{align}&lt;br&gt;
$$&lt;/p&gt;
&lt;p&gt;The R ecosystem offers a collection of tools for this purpose: from lightweight numerical solvers to full modeling frameworks. This article provides &lt;strong&gt;a practical overview of ODE solvers in R&lt;/strong&gt;, with a focus on helping users navigate the ecosystem and choose appropriate tools.&lt;/p&gt;
&lt;p&gt;All packages included here were tested with simple examples and the code is available in the &lt;a href=&quot;https://github.com/metelkin/ode-solvers-in-r&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What is included&lt;/h2&gt;
&lt;p&gt;We include R packages that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Support solving general ODE systems&lt;/li&gt;
&lt;li&gt;Are mentioned in literature, documentation, or community discussions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We intentionally exclude:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deprecated or archived packages&lt;/li&gt;
&lt;li&gt;Thin wrappers around other frameworks without original solvers or formats&lt;/li&gt;
&lt;li&gt;Small helper packages&lt;/li&gt;
&lt;li&gt;Proprietary tools with limited public documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2&gt;Packages overview table&lt;/h2&gt;
&lt;div class=&quot;table-h-scroll&quot;&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;Solver type&lt;/th&gt;
&lt;th&gt;Algorithms&lt;/th&gt;
&lt;th&gt;Model format&lt;/th&gt;
&lt;th&gt;Stiff&lt;/th&gt;
&lt;th&gt;DAE&lt;/th&gt;
&lt;th&gt;DDE&lt;/th&gt;
&lt;th&gt;Time events&lt;/th&gt;
&lt;th&gt;Conditional events&lt;/th&gt;
&lt;th&gt;Downloads (2025)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=deSolve&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;deSolve&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://www.netlib.org/odepack/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;ODEPACK&lt;/a&gt;; &lt;a href=&quot;http://www.netlib.org/ode/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;DASPK&lt;/a&gt; (Fortran)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;lsoda, lsode, lsodes, lsodar, vode, daspk, bdf, adams, euler, rk4, ode23, ode45,&lt;/td&gt;
&lt;td&gt;R func (interpreted); C/C++/Fortran (compiled)&lt;/td&gt;
&lt;td&gt;Yes (lsoda)&lt;/td&gt;
&lt;td&gt;Yes (daspk)&lt;/td&gt;
&lt;td&gt;Yes (dede)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (root finding)&lt;/td&gt;
&lt;td&gt;635628&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=diffeqr&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;diffeqr&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://docs.sciml.ai/DiffEqDocs/stable/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;DifferentialEquations.jl&lt;/a&gt; SciML ecosystem&lt;/td&gt;
&lt;td&gt;External runtime (Julia)&lt;/td&gt;
&lt;td&gt;&amp;gt; 200 algorithms &lt;a href=&quot;https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;see docs&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;R func (interpreted); Julia func (JIT/compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (root finding)&lt;/td&gt;
&lt;td&gt;4688&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=dMod&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;dMod&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;&lt;em&gt;depends on deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;DSL (cOde, compiled), API (compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;4947&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=EpiModel&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;EpiModel&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;&lt;em&gt;depends on deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;R func (interpreted)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes (dede)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;23088&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;* &lt;a href=&quot;https://iqrtools.intiquan.com/doc/book/license-and-availability.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;IQRTools&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://sundials.readthedocs.io/en/latest/cvodes/index.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;CVODES&lt;/a&gt; (SUNDIALS) (C)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;BDF, Adams&lt;/td&gt;
&lt;td&gt;DSL (Compiled)&lt;/td&gt;
&lt;td&gt;Yes (BDF)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;&lt;em&gt;NA&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=mrgsolve&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;mrgsolve&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://www.netlib.org/odepack/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;DLSODA&lt;/a&gt; (C++ translation)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;lsoda&lt;/td&gt;
&lt;td&gt;DSL (C++-like, compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;33544&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=odin&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;odin&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;&lt;em&gt;depends on deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;DSL (R-like, compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes (dede)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;17252&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=PBSddesolve&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;PBSddesolve&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://webhomes.maths.ed.ac.uk/~swood34/simon/dde.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;solv95&lt;/a&gt; (C)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;dde&lt;/td&gt;
&lt;td&gt;R func (interpreted)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;10341&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=PKPDsim&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;PKPDsim&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/boostorg/odeint&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Boost::odeint&lt;/a&gt; (C++)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;Adaptive RK (RKCK54)&lt;/td&gt;
&lt;td&gt;DSL (compiled)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;10319&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=pracma&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;pracma&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Matlab-inspired implementation&lt;/td&gt;
&lt;td&gt;Pure R&lt;/td&gt;
&lt;td&gt;ode23, ode23s, ode45, ode78&lt;/td&gt;
&lt;td&gt;R func (interpreted)&lt;/td&gt;
&lt;td&gt;Yes (ode23s)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;1059146&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=r2sundials&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;r2sundials&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://computing.llnl.gov/projects/sundials&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;SUNDIALS&lt;/a&gt; (C)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;BDF, Adams&lt;/td&gt;
&lt;td&gt;R func (interpreted); C++ (compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (via IDA)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes (root finding)&lt;/td&gt;
&lt;td&gt;3439&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=reticulate&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;reticulate&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;SciPy solve_ivp&lt;/a&gt; (Python)&lt;/td&gt;
&lt;td&gt;External runtime (Python)&lt;/td&gt;
&lt;td&gt;RK45, RK23, DOP853, Radau, BDF, LSODA&lt;/td&gt;
&lt;td&gt;R func (interpreted); Python func (interpreted)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes (root detection only)&lt;/td&gt;
&lt;td&gt;3566483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=rodeo&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;rodeo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;&lt;em&gt;depends on deSolve&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Table format (interpreted / compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (root finding)&lt;/td&gt;
&lt;td&gt;3386&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=rstan&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;rstan&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://mc-stan.org/docs/2_27/functions-reference/functions-ode-solver.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Stan Math Library&lt;/a&gt; (C++)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;rk45, bdf, adams, ckrk&lt;/td&gt;
&lt;td&gt;DSL (Stan language, compiled)&lt;/td&gt;
&lt;td&gt;Yes (bdf)&lt;/td&gt;
&lt;td&gt;Yes (limited, index-1)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;1107167&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=rxode2&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;rxode2&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/sdwfrost/liblsoda&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;LIBLSODA&lt;/a&gt; + custom (C)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;liblsoda, lsoda, dop853, indLin&lt;/td&gt;
&lt;td&gt;DSL (R-like, compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;42872&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://cran.r-project.org/package=sundialr&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;sundialr&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://computing.llnl.gov/projects/sundials&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;SUNDIALS&lt;/a&gt; (C)&lt;/td&gt;
&lt;td&gt;Compiled&lt;/td&gt;
&lt;td&gt;BDF, Adams&lt;/td&gt;
&lt;td&gt;R func (interpreted); C++ (compiled)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (via IDA)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;2024&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;* IQRTools is proprietary; version 99.0.0 is available under AGPL-3.0 and was used in this review.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Engine&lt;/h4&gt;
&lt;p&gt;This refers to the underlying numerical implementation used by the package. This can be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a well-known external library (e.g., ODEPACK)&lt;/li&gt;
&lt;li&gt;a custom compiled implementation&lt;/li&gt;
&lt;li&gt;another R package&lt;/li&gt;
&lt;li&gt;or an external runtime (e.g., another language)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Solver type&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pure R solvers&lt;/strong&gt;: Numerical algorithms implemented directly in R. These are easy to inspect and flexible, but typically slower due to interpreter overhead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compiled solvers&lt;/strong&gt;: Implemented in C/C++/Fortran or wrapping established libraries (e.g., ODEPACK). These provide significantly better performance and are the default choice for most applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;External runtime interfaces&lt;/strong&gt;: Packages that delegate computation to external ecosystems such as Julia or Python. These act as bridges rather than standalone solvers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Algorithms&lt;/h4&gt;
&lt;p&gt;This is the list of available numerical methods as documented by the package.&lt;/p&gt;
&lt;h4&gt;Model format&lt;/h4&gt;
&lt;p&gt;ODE models can be defined in different ways: as R functions, domain-specific languages (DSL), structured APIs, or even external code.&lt;/p&gt;
&lt;p&gt;The key distinction affecting performance is how the model is executed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Interpreted execution&lt;/strong&gt;: The model is defined as an R function and evaluated during each solver step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compiled execution&lt;/strong&gt;: The model is translated into compiled code before simulation, avoiding interpreter overhead and improving performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Stiff&lt;/h4&gt;
&lt;p&gt;Indicates whether the solver can handle &lt;strong&gt;stiff systems&lt;/strong&gt;. Stiffness arises when a system contains processes evolving on very different time scales. Solvers that support stiffness typically use implicit methods or adaptive switching (e.g., LSODA).&lt;/p&gt;
&lt;h4&gt;DAE / DDE&lt;/h4&gt;
&lt;p&gt;Support for these features is solver-dependent and often requires specific algorithms.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DAE (Differential-Algebraic Equations)&lt;/strong&gt;: Systems that include algebraic constraints in addition to differential equations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DDE (Delay Differential Equations)&lt;/strong&gt;: Systems where derivatives depend on past states.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Time events / Conditional events&lt;/h4&gt;
&lt;p&gt;These features are important for modeling real-world systems with discontinuities.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Time events&lt;/strong&gt;: Discrete changes applied at predefined time points (e.g., dosing events).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conditional events&lt;/strong&gt;: Events triggered when a condition is met during simulation (e.g., threshold crossing).&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Downloads 2025&lt;/h4&gt;
&lt;p&gt;Total number of downloads in 2025 from CRAN, reflecting usage statistics. Calculated with &lt;a href=&quot;https://cranlogs.r-pkg.org/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;CRAN logs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Repository and test cases&lt;/h2&gt;
&lt;p&gt;To ensure practical consistency, packages were tested on two simple ODE models. The full code for all packages is available in the companion &lt;a href=&quot;https://github.com/metelkin/ode-solvers-in-r&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are providing here the code in &lt;code&gt;mrgsolve&lt;/code&gt; format for two examples: a pharmacokinetic model with non-linear elimination, and the Robertson problem, which is a classic stiff ODE system.&lt;/p&gt;
&lt;h3&gt;Example 1: Pharmacokinetic model with non-linear elimination&lt;/h3&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;library&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mrgsolve&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;magrittr&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# load model as DLS (C++ like)&lt;/span&gt;
mod &lt;span class=&quot;token operator&quot;&gt;&amp;lt;-&lt;/span&gt; mcode&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;pk_model&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &#39;
&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;PARAM
kabs_Alc &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;10.0&lt;/span&gt;
Vmax_ADH &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;
Km_ADH &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0.1&lt;/span&gt;
V_blood &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5.5&lt;/span&gt;

&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;CMT
Alc_g Alc_b_amt

&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;ODE
double Alc_b &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Alc_b_amt &lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt; V_blood&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
double vabs_Alc &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; kabs_Alc &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; Alc_g&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
double v_ADH &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Vmax_ADH &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; Alc_b &lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Km_ADH &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; Alc_b&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; V_blood&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

dxdt_Alc_g &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;vabs_Alc&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
dxdt_Alc_b_amt &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; vabs_Alc &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; v_ADH&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;TABLE
capture Alc_b&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&#39;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# time event&lt;/span&gt;
ev1 &lt;span class=&quot;token operator&quot;&gt;&amp;lt;-&lt;/span&gt; ev&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;time &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; amt &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; cmt &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Alc_g&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# solve&lt;/span&gt;
out &lt;span class=&quot;token operator&quot;&gt;&amp;lt;-&lt;/span&gt; mod &lt;span class=&quot;token percent-operator operator&quot;&gt;%&gt;%&lt;/span&gt;
  init&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Alc_g &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Alc_b_amt &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token percent-operator operator&quot;&gt;%&gt;%&lt;/span&gt;
  ev&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;ev1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token percent-operator operator&quot;&gt;%&gt;%&lt;/span&gt;
  mrgsim&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;start &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; end &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; delta &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0.001&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

plot&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;out&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://metelkin.me/landscape-of-ode-solvers-in-r/img/fig1-example-1-sim.png&quot; alt=&quot;example-1-sim&quot;&gt;&lt;/p&gt;
&lt;h3&gt;Example 2: Robertson problem stiff ODE&lt;/h3&gt;
&lt;pre class=&quot;language-r&quot;&gt;&lt;code class=&quot;language-r&quot;&gt;library&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mrgsolve&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;magrittr&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# load model as DLS (C++ like)&lt;/span&gt;
mod &lt;span class=&quot;token operator&quot;&gt;&amp;lt;-&lt;/span&gt; mcode&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;rob_model&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &#39;
&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;CMT
A B C

&lt;span class=&quot;token operator&quot;&gt;$&lt;/span&gt;ODE
dxdt_A &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0.04&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; A &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1e4&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; B &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; C&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
dxdt_B &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;token number&quot;&gt;0.04&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; A &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1e4&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; B &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; C &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3e7&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; pow&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;B&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
dxdt_C &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;token number&quot;&gt;3e7&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; pow&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;B&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&#39;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# solve&lt;/span&gt;
out &lt;span class=&quot;token operator&quot;&gt;&amp;lt;-&lt;/span&gt; mod &lt;span class=&quot;token percent-operator operator&quot;&gt;%&gt;%&lt;/span&gt;
  init&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;A &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; B &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; C &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token percent-operator operator&quot;&gt;%&gt;%&lt;/span&gt;
  mrgsim&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;start &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; end &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; delta &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1e-2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

plot&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;out&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://metelkin.me/landscape-of-ode-solvers-in-r/img/fig2-example-2-sim.png&quot; alt=&quot;example-2-sim&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Author&#39;s notes&lt;/h2&gt;
&lt;p&gt;The goal of this review was to provide &lt;strong&gt;a maximally complete and objective overview&lt;/strong&gt; of tools for solving ODEs in R. The packages included in this survey differ in their purpose and functionality: from simple numerical solvers to full-featured frameworks and specialized domain-specific tools. Many aspects, such as computational performance, numerical accuracy, and advanced functionality are intentionally not covered in this article.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Due to the nature of the R ecosystem, most tools that could be systematically reviewed, tested, and compared in a reproducible way are open-source packages.  While several &lt;strong&gt;proprietary engines&lt;/strong&gt; also provide ODE-solving capabilities, their internal implementations, numerical methods, and usage are not always publicly documented or accessible without licenses. As a result, they are not included in the main comparison table.&lt;/p&gt;
&lt;p&gt;For a broader overview, see the &lt;a href=&quot;https://cran.r-project.org/web/views/DifferentialEquations.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;CRAN Task View: Differential Equations&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Download metrics&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3&gt;deSolve&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://cran.r-project.org/package=deSolve&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;deSolve&lt;/a&gt; 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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3&gt;Model formats&lt;/h3&gt;
&lt;p&gt;An important factor when choosing a tool is the model definition format. The R ecosystem offers a wide range of approaches: from simple R functions (deSolve, pracma, PBSddesolve) and tabular specifications (rodeo) to domain-specific languages (PKPDsim, rstan) and low-level compiled code (rxode2, mrgsolve, deSolve).&lt;/p&gt;
&lt;p&gt;These differences affect both performance and usability, and often determine how easily a model can be developed, modified, and integrated into a workflow.&lt;/p&gt;
&lt;h3&gt;Limitations and gaps&lt;/h3&gt;
&lt;p&gt;Despite the variety of available tools, support for some important features remains limited across the R ecosystem. In particular, capabilities such as delay differential equations (DDE), differential-algebraic equations (DAE), and advanced event handling are only partially implemented and are available in relatively few packages. As a result, modeling tasks that rely on these capabilities may require additional effort, careful selection of tools, or even custom implementations.&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;This article will be continuously updated. If you find any inaccuracies or have suggestions, feel free to open an issue:&lt;br&gt;
&lt;a href=&quot;https://github.com/metelkin/ode-solvers-in-r/issues&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://github.com/metelkin/ode-solvers-in-r/issues&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
</feed>