diff options
Diffstat (limited to 'gnu/packages/statistics.scm')
-rw-r--r-- | gnu/packages/statistics.scm | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index cc879be99c..e78e8d199d 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -9,6 +9,8 @@ ;;; Copyright © 2016, 2017 Raoul Bonnal <ilpuccio.febo@gmail.com> ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2017 Alex Kost <alezost@gmail.com> +;;; Copyright © 2018 Alex Branham <alex.branham@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +47,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages cran) #:use-module (gnu packages curl) + #:use-module (gnu packages emacs) #:use-module (gnu packages gcc) #:use-module (gnu packages gtk) #:use-module (gnu packages gettext) @@ -5711,6 +5714,64 @@ plotting function (and equivalents of curve, density, acf and barplot) as well as a boxplot function.") (license license:lgpl3+))) +(define-public python-rpy2 + (package + (name "python-rpy2") + (version "2.9.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rpy2" version)) + (sha256 + (base32 + "0bl1d2qhavmlrvalir9hmkjh74w21vzkvc2sg3cbb162s10zfmxy")))) + (build-system python-build-system) + (arguments + '(#:modules ((ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26) + (guix build utils) + (guix build python-build-system)) + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((cwd (getcwd))) + (setenv "PYTHONPATH" + (string-append cwd "/build/" + (find (cut string-prefix? "lib" <>) + (scandir (string-append cwd "/build"))) + ":" + (getenv "PYTHONPATH")))) + (invoke "python" "-m" "rpy2.tests" "-v")))))) + (propagated-inputs + `(("python-six" ,python-six) + ("python-jinja2" ,python-jinja2) + ("python-pytz" ,python-pytz))) + (inputs + `(("readline" ,readline) + ("icu4c" ,icu4c) + ("pcre" ,pcre) + ("r-minimal" ,r-minimal) + ("r-survival" ,r-survival) + ("r-ggplot2" ,r-ggplot2) + ("r-rsqlite" ,r-rsqlite) + ("r-dplyr" ,r-dplyr) + ("r-dbplyr" ,r-dbplyr) + ("python-numpy" ,python-numpy))) + (native-inputs + `(("zlib" ,zlib))) + (home-page "https://rpy2.bitbucket.io/") + (synopsis "Python interface to the R language") + (description "rpy2 is a redesign and rewrite of rpy. It is providing a +low-level interface to R from Python, a proposed high-level interface, +including wrappers to graphical libraries, as well as R-like structures and +functions.") + ;; Any of these licenses can be picked for the R interface. The whole + ;; project is released under GPLv2+ according to the license declaration + ;; in "setup.py". + (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+)))) + (define-public java-jdistlib (package (name "java-jdistlib") @@ -5747,3 +5808,70 @@ Java package that provides routines for various statistical distributions.") ;; are under the GPLv3, which is a mistake. The author confirmed in an ;; email that this whole project should be under GPLv2+. (license license:gpl2+))) + +(define-public emacs-ess + (package + (name "emacs-ess") + (version "17.11") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/emacs-ess/ESS/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "0cbilbsiwvcyf6d5y24mymp57m3ana5dkzab3knfs83w4a3a4c5c")) + (file-name (string-append name "-" version ".tar.gz")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Stop ESS from trying to bundle an external julia-mode.el. + (substitute* "lisp/Makefile" + (("^\tjulia-mode.elc\\\\\n") "") + (("^dist: all julia-mode.el") + "dist: all")) + ;; No need to build docs in so many formats. Also, skipping + ;; pdf lets us not pull in texlive. + (substitute* "doc/Makefile" + (("all : info text html pdf") + "all : info") + (("install: install-info install-other-docs") + "install: install-info")) + ;; Test fails upstream + (substitute* "test/ess-r-tests.el" + (("ert-deftest ess-r-namespaced-eval-no-srcref-in-errors ()") + "ert-deftest ess-r-namespaced-eval-no-srcref-in-errors () :expected-result :failed")) + #t)))) + (build-system gnu-build-system) + (arguments + (let ((base-directory "/share/emacs/site-lisp/guix.d/ess")) + `(#:make-flags (list (string-append "PREFIX=" %output) + (string-append "ETCDIR=" %output "/" + ,base-directory "/etc") + (string-append "LISPDIR=" %output "/" + ,base-directory)) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'more-shebang-patching + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makeconf" + (("SHELL = /bin/sh") + (string-append "SHELL = " (which "sh")))) + #t)) + (replace 'check + (lambda _ + (invoke "make" "test"))))))) + (inputs + `(("emacs" ,emacs-minimal) + ("r-minimal" ,r-minimal))) + (native-inputs + `(("perl" ,perl) + ("texinfo" ,texinfo))) + (propagated-inputs + `(("emacs-julia-mode" ,emacs-julia-mode))) + (home-page "https://ess.r-project.org/") + (synopsis "Emacs mode for statistical analysis programs") + (description "Emacs Speaks Statistics (ESS) is an add-on package for GNU +Emacs. It is designed to support editing of scripts and interaction with +various statistical analysis programs such as R, Julia, and JAGS.") + (license license:gpl2+))) |