guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/12: gnu: Add r-animation.


From: guix-commits
Subject: 06/12: gnu: Add r-animation.
Date: Wed, 28 Sep 2022 16:14:57 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 190c48c6ba0c4844185d93a20fdf33227cd29c76
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Sep 28 21:56:35 2022 +0200

    gnu: Add r-animation.
    
    * gnu/packages/cran.scm (r-animation): New variable.
---
 gnu/packages/cran.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 8ab87846d4..003a9624d9 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -24783,6 +24783,61 @@ Mardia, K.V. (2016).  Statistical shape analysis, with 
Applications in R (2nd
 Edition), John Wiley and Sons.")
     (license license:gpl2)))
 
+(define-public r-animation
+  (package
+    (name "r-animation")
+    (version "2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "animation" version))
+              (sha256
+               (base32
+                "0sg4sz5lkn85yzpcg22xkr7921cbnh7g74nlp9imjy7c0hdqyhc8"))
+              (snippet
+               '(for-each delete-file
+                          
'("inst/misc/scianimator/js/jquery.scianimator.min.js"
+                            "inst/misc/scianimator/js/jquery-1.4.4.min.js")))))
+    (properties `((upstream-name . "animation")))
+    (build-system r-build-system)
+    (arguments
+     (list
+      #:phases
+      '(modify-phases %standard-phases
+         (add-after 'unpack 'process-javascript
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "inst/misc/"
+               (symlink (search-input-file
+                         inputs
+                         "share/javascript/jquery.scianimator.min.js")
+                        "scianimator/js/jquery.scianimator.min.js")
+               (invoke "esbuild" (assoc-ref inputs "js-jquery")
+                       "--minify"
+                       (string-append "--outfile="
+                                      
"scianimator/js/jquery-1.4.4.min.js"))))))))
+    (propagated-inputs (list r-magick))
+    (inputs (list js-scianimator))
+    (native-inputs
+     `(("esbuild" ,esbuild)
+       ("js-jquery"
+        ,(origin
+           (method url-fetch)
+           (uri "https://code.jquery.com/jquery-1.4.4.js";)
+           (sha256
+            (base32
+             "10nl4smq63vrfb0c3n0fknm1zw7ss8gicy6wc6jb6l3rmyad075k"))))))
+    (home-page "https://yihui.org/animation/";)
+    (synopsis "Gallery of animations and utilities to create animations")
+    (description
+     "This package provides functions for animations in statistics, covering
+topics in probability theory, mathematical statistics, multivariate
+statistics, non-parametric statistics, sampling survey, linear models, time
+series, computational statistics, data mining and machine learning.  These
+functions may be helpful in teaching statistics and data analysis.  Also
+provided in this package are a series of functions to save animations to
+various formats, e.g. GIF, HTML pages, PDF, and videos.  PDF animations can be
+inserted into Sweave / @code{knitr} easily.")
+    (license (list license:gpl2+ license:gpl3+))))
+
 (define-public r-anthropometry
   (package
     (name "r-anthropometry")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]