guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: Add r-collapsibletree.


From: guix-commits
Subject: branch master updated: gnu: Add r-collapsibletree.
Date: Thu, 04 Feb 2021 15:29:28 -0500

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new e15f55e  gnu: Add r-collapsibletree.
e15f55e is described below

commit e15f55e7c3198d33251ade9bbe22be9db2d5b0be
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Feb 4 21:29:07 2021 +0100

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

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index e650c56..e62c1c0 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -6691,6 +6691,58 @@ data.frame and more.  This is useful for decision trees, 
machine learning,
 finance, conversion from and to JSON, and many other applications.")
     (license license:gpl2+)))
 
+(define-public r-collapsibletree
+  (package
+    (name "r-collapsibletree")
+    (version "0.1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "collapsibleTree" version))
+       (sha256
+        (base32
+         "0b65pbp1wnpsrayqi630ds4r98jvcvynnlp6wxdqrnnr9nzw5343"))
+       (snippet
+        '(begin
+           ;; Delete minified JavaScript file
+           (delete-file "inst/htmlwidgets/lib/d3-4.10.2/d3.min.js")
+           #true))))
+    (properties
+     `((upstream-name . "collapsibleTree")))
+    (build-system r-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'process-javascript
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "inst/htmlwidgets/lib/d3-4.10.2/"
+               (let ((source (assoc-ref inputs "d3.v4.js"))
+                     (target "d3.min.js"))
+                 (format #t "Processing ~a --> ~a~%"
+                         source target)
+                 (invoke "esbuild" source "--minify"
+                         (string-append "--outfile=" target)))))))))
+    (propagated-inputs
+     `(("r-data-tree" ,r-data-tree)
+       ("r-htmlwidgets" ,r-htmlwidgets)))
+    (native-inputs
+     `(("esbuild" ,esbuild)
+       ("d3.v4.js"
+        ,(origin
+           (method url-fetch)
+           (uri "https://d3js.org/d3.v4.js";)
+           (sha256
+            (base32
+             "0y7byf6kcinfz9ac59jxc4v6kppdazmnyqfav0dm4h550fzfqqlg"))))))
+    (home-page "https://github.com/AdeelK93/collapsibleTree";)
+    (synopsis "Interactive collapsible tree diagrams using D3.js")
+    (description
+     "This is a package for interactive Reingold-Tilford tree diagrams created
+using D3.js, where every node can be expanded and collapsed by clicking on it.
+Tooltips and color gradients can be mapped to nodes using a numeric column in
+the source data frame.")
+    (license license:gpl3+)))
+
 (define-public r-rappdirs
   (package
     (name "r-rappdirs")



reply via email to

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