Subject: [bug#60885] [PATCH 3/4] gnu: Add r-roptim.

From: Simon Tournier <[email-masked]>
Date: Tue, 17 Jan 2023 18:30:40 +0100

* gnu/packages/cran.scm (r-roptim): New variable.
---
 gnu/packages/cran.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 3fcbd3b9f6..aad49b4524 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -31,7 +31,7 @@
 ;;; Copyright © 2020 Antoine Côté <[email-masked]>
 ;;; Copyright © 2020 Arun Isaac <[email-masked]>
 ;;; Copyright © 2020 Magali Lemes <[email-masked]>
-;;; Copyright © 2020, 2021, 2022 Simon Tournier <[email-masked]>
+;;; Copyright © 2020, 2021, 2022, 2023 Simon Tournier <[email-masked]>
 ;;; Copyright © 2020 Aniket Patil <[email-masked]>
 ;;; Copyright © 2021 Marcel Schilling <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
@@ -9214,6 +9214,27 @@ (define-public r-randomizr
 experimental designs and random samples for common sampling designs.")
     (license license:expat)))
 
+(define-public r-roptim
+  (package
+    (name "r-roptim")
+    (version "0.1.6")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "roptim" version))
+              (sha256
+               (base32
+                "11h6qdi0rsv0bpps6nxkzzapan284q0gldzkmgx3ww5kvnic5w3y"))))
+    (properties `((upstream-name . "roptim")))
+    (build-system r-build-system)
+    (propagated-inputs (list r-rcpp r-rcpparmadillo))
+    (home-page "https://github.com/ypan1988/roptim/")
+    (synopsis "General purpose optimization in R using C++")
+    (description
+     "This package performs optimization in R using C++.  A unified wrapper
+interface is provided to call C functions of the five optimization algorithms
+('Nelder-Mead', BFGS', CG', L-BFGS-B and SANN') underlying @code{optim()}.")
+    (license license:gpl2+)))
+
 (define-public r-base64url
   (package
     (name "r-base64url")
-- 
2.38.1