Merge branch 'core-updates'
[guix.git] / gnu / packages / statistics.scm
blob700a8957cc33f25f557afdb7518262823a1282a1
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Vicente Vera Parra <vicentemvp@gmail.com>
4 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
7 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
8 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages statistics)
26   #:use-module ((guix licenses) #:prefix license:)
27   #:use-module (guix packages)
28   #:use-module (guix download)
29   #:use-module (guix utils)
30   #:use-module (guix build-system gnu)
31   #:use-module (guix build-system r)
32   #:use-module (guix build-system python)
33   #:use-module (gnu packages)
34   #:use-module (gnu packages compression)
35   #:use-module (gnu packages curl)
36   #:use-module (gnu packages gcc)
37   #:use-module (gnu packages gtk)
38   #:use-module (gnu packages gettext)
39   #:use-module (gnu packages glib)
40   #:use-module (gnu packages haskell)
41   #:use-module (gnu packages icu4c)
42   #:use-module (gnu packages image)
43   #:use-module (gnu packages java)
44   #:use-module (gnu packages machine-learning)
45   #:use-module (gnu packages maths)
46   #:use-module (gnu packages multiprecision)
47   #:use-module (gnu packages pcre)
48   #:use-module (gnu packages perl)
49   #:use-module (gnu packages pkg-config)
50   #:use-module (gnu packages python)
51   #:use-module (gnu packages readline)
52   #:use-module (gnu packages ssh)
53   #:use-module (gnu packages texinfo)
54   #:use-module (gnu packages tls)
55   #:use-module (gnu packages base)
56   #:use-module (gnu packages web)
57   #:use-module (gnu packages xml)
58   #:use-module (gnu packages xorg)
59   #:use-module (gnu packages zip)
60   #:use-module (srfi srfi-1))
63 (define-public pspp
64   (package
65     (name "pspp")
66     (version "0.10.2")
67     (source
68      (origin
69       (method url-fetch)
70       (uri (string-append "mirror://gnu/pspp/pspp-"
71                           version ".tar.gz"))
72       (sha256
73        (base32
74         "1afsq0a3iij64qacczvwhk81qg0q5rfqm055y5h9ls28d6paqz7p"))))
75     (build-system gnu-build-system)
76     (inputs
77      `(("cairo" ,cairo)
78        ("gettext" ,gettext-minimal)
79        ("gsl" ,gsl)
80        ("libxml2" ,libxml2)
81        ("pango" ,pango)
82        ("readline" ,readline)
83        ("gtk" ,gtk+)
84        ("gtksourceview" ,gtksourceview)
85        ("zlib" ,zlib)))
86     (native-inputs
87      `(("glib" ,glib "bin")             ;for glib-genmarshal
88        ("perl" ,perl)
89        ("pkg-config" ,pkg-config)))
90     (home-page "http://www.gnu.org/software/pspp/")
91     (synopsis "Statistical analysis")
92     (description
93      "GNU PSPP is a statistical analysis program.  It can perform
94 descriptive statistics, T-tests, linear regression and non-parametric tests.
95 It features both a graphical interface as well as command-line input.  PSPP
96 is designed to interoperate with Gnumeric, LibreOffice and OpenOffice.  Data
97 can be imported from spreadsheets, text files and database sources and it can
98 be output in text, PostScript, PDF or HTML.")
99     (license license:gpl3+)))
101 (define-public r
102   (package
103     (name "r")
104     (version "3.3.1")
105     (source (origin
106               (method url-fetch)
107               (uri (string-append "mirror://cran/src/base/R-"
108                                   (version-prefix version 1) "/R-"
109                                   version ".tar.gz"))
110               (sha256
111                (base32
112                 "1qm9znh8akfy9fkzzi6f1vz2w1dd0chsr6qn7kw80lqzhgjrmi9x"))))
113     (build-system gnu-build-system)
114     (arguments
115      `(#:make-flags
116        (list (string-append "LDFLAGS=-Wl,-rpath="
117                             (assoc-ref %outputs "out")
118                             "/lib/R/lib"))
119        #:phases
120        (modify-phases %standard-phases
121          (add-before 'configure 'patch-uname
122            (lambda* (#:key inputs #:allow-other-keys)
123              (let ((uname-bin (string-append (assoc-ref inputs "coreutils")
124                                              "/bin/uname")))
125                (substitute* "src/scripts/R.sh.in"
126                  (("uname") uname-bin)))
127              #t))
128          (add-before
129           'configure 'set-default-pager
130           ;; Set default pager to "cat", because otherwise it is "false",
131           ;; making "help()" print nothing at all.
132           (lambda _ (setenv "PAGER" "cat") #t))
133          (add-before 'check 'set-timezone
134           ;; Some tests require the timezone to be set.
135           (lambda* (#:key inputs #:allow-other-keys)
136             (setenv "TZ" "UTC")
137             (setenv "TZDIR"
138                     (string-append (assoc-ref inputs "tzdata")
139                                    "/share/zoneinfo"))
140             #t))
141          (add-after 'build 'make-info
142           (lambda _ (zero? (system* "make" "info"))))
143          (add-after 'build 'install-info
144           (lambda _ (zero? (system* "make" "install-info")))))
145        #:configure-flags
146        '("--with-cairo"
147          "--with-blas=-lopenblas"
148          "--with-libpng"
149          "--with-jpeglib"
150          "--with-libtiff"
151          "--with-ICU"
152          "--enable-R-shlib"
153          "--enable-BLAS-shlib"
154          "--with-system-zlib"
155          "--with-system-bzlib"
156          "--with-system-pcre"
157          "--with-system-tre"
158          "--with-system-xz")))
159     ;; R has some support for Java.  When the JDK is available at configure
160     ;; time environment variables pointing to the JDK will be recorded under
161     ;; $R_HOME/etc and ./tools/getsp.java will be compiled which is used by "R
162     ;; CMD javareconf".  "R CMD javareconf" appears to only be used to update
163     ;; the recorded environment variables in $R_HOME/etc.  Refer to
164     ;; https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Java-support
165     ;; for additional information.
167     ;; As the JDK is a rather large input with only very limited effects on R,
168     ;; we decided to drop it.
169     (native-inputs
170      `(("bzip2" ,bzip2)
171        ("perl" ,perl)
172        ("pkg-config" ,pkg-config)
173        ("texinfo" ,texinfo) ; for building HTML manuals
174        ("which" ,which) ; for tests/Examples/base-Ex.R
175        ("xz" ,xz)))
176     (inputs
177      `(;; We need not only cairo here, but pango to ensure that tests for the
178        ;; "cairo" bitmapType plotting backend succeed.
179        ("pango" ,pango)
180        ("coreutils" ,coreutils)
181        ("curl" ,curl)
182        ("tzdata" ,tzdata)
183        ("openblas" ,openblas)
184        ("gfortran" ,gfortran)
185        ("icu4c" ,icu4c)
186        ("libjpeg" ,libjpeg)
187        ("libpng" ,libpng)
188        ("libtiff" ,libtiff)
189        ("libxt" ,libxt)
190        ("pcre" ,pcre)
191        ("readline" ,readline)
192        ("zlib" ,zlib)))
193     (native-search-paths
194      (list (search-path-specification
195             (variable "R_LIBS_SITE")
196             (files (list "site-library/")))))
197     (home-page "http://www.r-project.org/")
198     (synopsis "Environment for statistical computing and graphics")
199     (description
200      "R is a language and environment for statistical computing and graphics.
201 It provides a variety of statistical techniques, such as linear and nonlinear
202 modeling, classical statistical tests, time-series analysis, classification
203 and clustering.  It also provides robust support for producing
204 publication-quality data plots.  A large amount of 3rd-party packages are
205 available, greatly increasing its breadth and scope.")
206     (license license:gpl3+)))
208 (define-public r-colorspace
209   (package
210     (name "r-colorspace")
211     (version "1.2-7")
212     (source
213      (origin
214        (method url-fetch)
215        (uri (cran-uri "colorspace" version))
216        (sha256
217         (base32 "0flw97iwwpkxy6si9cn982jhl61wb1rxi3r0nz2xxf0c3fzw18d5"))))
218     (build-system r-build-system)
219     (home-page "http://cran.r-project.org/web/packages/colorspace")
220     (synopsis "Color space manipulation")
221     (description
222      "This package carries out a mapping between assorted color spaces
223 including RGB, HSV, HLS, CIEXYZ, CIELUV, HCL (polar CIELUV), CIELAB and polar
224 CIELAB.  Qualitative, sequential, and diverging color palettes based on HCL
225 colors are provided.")
226     (license license:bsd-3)))
228 (define-public r-dichromat
229   (package
230     (name "r-dichromat")
231     (version "2.0-0")
232     (source
233      (origin
234        (method url-fetch)
235        (uri (cran-uri "dichromat" version))
236        (sha256
237         (base32 "1l8db1nk29ccqg3mkbafvfiw0775iq4gapysf88xq2zp6spiw59i"))))
238     (build-system r-build-system)
239     (home-page "http://cran.r-project.org/web/packages/dichromat")
240     (synopsis "Color schemes for dichromats")
241     (description
242      "Dichromat collapses red-green or green-blue distinctions to simulate the
243 effects of different types of color-blindness.")
244     (license license:gpl2+)))
246 (define-public r-digest
247   (package
248     (name "r-digest")
249     (version "0.6.10")
250     (source
251      (origin
252        (method url-fetch)
253        (uri (cran-uri "digest" version))
254        (sha256
255         (base32 "07825781nl85gx3pqskc04ywgs0f874qj9z2nyrwz7h0aqks0l8c"))))
256     (build-system r-build-system)
257     ;; Vignettes require r-knitr, which requires r-digest, so we have to
258     ;; disable them and the tests.
259     (arguments
260      `(#:tests? #f
261        #:configure-flags (list "--no-build-vignettes")))
262     (home-page "http://dirk.eddelbuettel.com/code/digest.html")
263     (synopsis "Create cryptographic hash digests of R objects")
264     (description
265      "This package contains an implementation of a function 'digest()' for the
266 creation of hash digests of arbitrary R objects (using the md5, sha-1,
267 sha-256, crc32, xxhash and murmurhash algorithms) permitting easy comparison
268 of R language objects, as well as a function 'hmac()' to create hash-based
269 message authentication code.
271 Please note that this package is not meant to be deployed for cryptographic
272 purposes for which more comprehensive (and widely tested) libraries such as
273 OpenSSL should be used.")
274     (license license:gpl2+)))
276 (define-public r-estimability
277   (package
278     (name "r-estimability")
279     (version "1.1-1")
280     (source (origin
281               (method url-fetch)
282               (uri (cran-uri "estimability" version))
283               (sha256
284                (base32
285                 "049adh8i0ad0m0qln2ylqdxcs5v2q9zfignn2a50r5f93ip2ay6w"))))
286     (build-system r-build-system)
287     (home-page "http://cran.r-project.org/web/packages/estimability")
288     (synopsis "Tools for assessing estimability of linear predictions")
289     (description "Provides tools for determining estimability of linear
290 functions of regression coefficients, and 'epredict' methods that handle
291 non-estimable cases correctly.")
292     (license license:gpl2+)))
294 (define-public r-gtable
295   (package
296     (name "r-gtable")
297     (version "0.1.2")
298     (source
299      (origin
300        (method url-fetch)
301        (uri (cran-uri "gtable" version))
302        (sha256
303         (base32 "0k9hfj6r5y238gqh92s3cbdn34biczx3zfh79ix5xq0c5vkai2xh"))))
304     (build-system r-build-system)
305     (home-page "https://cran.r-project.org/web/packages/gtable")
306     (synopsis "R library to arrange grobs in tables")
307     (description
308      "Gtable is a collection of tools to make it easier to work with
309 \"tables\" of grobs.")
310     (license license:gpl2+)))
312 (define-public r-pheatmap
313   (package
314     (name "r-pheatmap")
315     (version "1.0.8")
316     (source
317      (origin
318        (method url-fetch)
319        (uri (cran-uri "pheatmap" version))
320        (sha256
321         (base32
322          "1ik0k69kb4n7xl3bkx4p09kw08ri93855zcsxq1c668171jqfiji"))))
323     (build-system r-build-system)
324     (propagated-inputs
325      `(("r-gtable" ,r-gtable)
326        ("r-rcolorbrewer" ,r-rcolorbrewer)
327        ("r-scales" ,r-scales)))
328     (home-page
329      "http://cran.r-project.org/web/packages/pheatmap")
330     (synopsis "Pretty heatmaps")
331     (description
332      "This package provides an implementation of heatmaps that offers more
333 control over dimensions and appearance.")
334     (license license:gpl2+)))
336 (define-public r-labeling
337   (package
338     (name "r-labeling")
339     (version "0.3")
340     (source
341      (origin
342        (method url-fetch)
343        (uri (cran-uri "labeling" version))
344        (sha256
345         (base32 "13sk7zrrrzry6ky1bp8mmnzcl9jhvkig8j4id9nny7z993mnk00d"))))
346     (build-system r-build-system)
347     (home-page "http://cran.r-project.org/web/packages/labeling")
348     (synopsis "Axis labeling algorithms")
349     (description "The labeling package provides a range of axis labeling
350 algorithms.")
351     (license license:expat)))
353 (define-public r-magrittr
354   (package
355     (name "r-magrittr")
356     (version "1.5")
357     (source
358      (origin
359        (method url-fetch)
360        (uri (cran-uri "magrittr" version))
361        (sha256
362         (base32 "1s1ar6rag8m277qcqmdp02gn4awn9bdj9ax0r8s32i59mm1mki05"))))
363     (build-system r-build-system)
364     (home-page "http://cran.r-project.org/web/packages/magrittr/index.html")
365     (synopsis "A forward-pipe operator for R")
366     (description
367      "Magrittr provides a mechanism for chaining commands with a new
368 forward-pipe operator, %>%.  This operator will forward a value, or the result
369 of an expression, into the next function call/expression.  There is flexible
370 support for the type of right-hand side expressions.  For more information,
371 see package vignette.  To quote Rene Magritte, \"Ceci n'est pas un pipe.\"")
372     (license license:expat)))
374 (define-public r-munsell
375   (package
376     (name "r-munsell")
377     (version "0.4.3")
378     (source
379      (origin
380        (method url-fetch)
381        (uri (cran-uri "munsell" version))
382        (sha256
383         (base32 "0jdxlbjslkzaqgp058da1cgm85qvqi09wpcgpvp4hvwnmy83qz1r"))))
384     (build-system r-build-system)
385     (propagated-inputs
386      `(("r-colorspace" ,r-colorspace)))
387     (home-page "http://cran.r-project.org/web/packages/munsell")
388     (synopsis "Munsell colour system")
389     (description
390      "The Munsell package contains Functions for exploring and using the
391 Munsell colour system.")
392     (license license:expat)))
394 (define-public r-rcpp
395   (package
396     (name "r-rcpp")
397     (version "0.12.7")
398     (source
399      (origin
400        (method url-fetch)
401        (uri (cran-uri "Rcpp" version))
402        (sha256
403         (base32 "1ipid4yfqp1k5c70f7bz7izzq63srmrcxhiqrnyilk2wgrvd7ypb"))))
404     (build-system r-build-system)
405     (home-page "http://www.rcpp.org")
406     (synopsis "Seamless R and C++ Integration")
407     (description
408      "The Rcpp package provides R functions as well as C++ classes which offer
409 a seamless integration of R and C++.  Many R data types and objects can be
410 mapped back and forth to C++ equivalents which facilitates both writing of new
411 code as well as easier integration of third-party libraries.  Documentation
412 about Rcpp is provided by several vignettes included in this package, via the
413 'Rcpp Gallery' site at <http://gallery.rcpp.org>, the paper by Eddelbuettel
414 and Francois (2011, JSS), and the book by Eddelbuettel (2013, Springer); see
415 'citation(\"Rcpp\")' for details on these last two.")
416     (license license:gpl2+)))
418 (define-public r-matrix
419   (package
420     (name "r-matrix")
421     (version "1.2-7.1")
422     (source
423      (origin
424        (method url-fetch)
425        (uri (cran-uri "Matrix" version))
426        (sha256
427         (base32
428          "09rd51na9spz0lm1lylkfhw43w7c922b83m4jsggmpg3pbd6dssa"))))
429     (properties `((upstream-name . "Matrix")))
430     (build-system r-build-system)
431     (propagated-inputs
432      `(("r-lattice" ,r-lattice)))
433     (home-page "http://Matrix.R-forge.R-project.org/")
434     (synopsis "Sparse and dense matrix classes and methods")
435     (description
436      "This package provides classes and methods for dense and sparse matrices
437 and operations on them using LAPACK and SuiteSparse.")
438     (license license:gpl2+)))
440 (define-public r-mgcv
441   (package
442    (name "r-mgcv")
443    (version "1.8-15")
444    (source
445     (origin
446      (method url-fetch)
447      (uri (cran-uri "mgcv" version))
448      (sha256
449       (base32
450        "05xzmsx51y92c0r0yihac8m9d3v1sqnn8ahcgm3q75j8z6zybsjs"))))
451    (build-system r-build-system)
452    (home-page "http://cran.r-project.org/web/packages/mgcv")
453    (synopsis "Mixed generalised additive model computation")
454    (description
455     "GAMs, GAMMs and other generalized ridge regression with multiple smoothing
456 parameter estimation by GCV, REML or UBRE/AIC.  The library includes a
457 @code{gam()} function, a wide variety of smoothers, JAGS support and
458 distributions beyond the exponential family.")
459    (license license:gpl2+)))
461 (define-public r-permute
462   (package
463    (name "r-permute")
464    (version "0.9-4")
465    (source
466     (origin
467      (method url-fetch)
468      (uri (cran-uri "permute" version))
469      (sha256
470       (base32
471        "1w8wzk1fg9q7wvisnfp2js70dg0m9wi12gkdhpyngpbdcgssahd5"))))
472    (build-system r-build-system)
473    ;; Tests do not run correctly, but running them properly would entail a
474    ;; circular dependency with vegan.
475    (home-page "https://github.com/gavinsimpson/permute")
476    (synopsis "Functions for Generating Restricted Permutations of Data")
477    (description
478     "This package provides a set of restricted permutation designs for freely
479 exchangeable, line transects (time series), spatial grid designs and permutation
480 of blocks (groups of samples).  @code{permute} also allows split-plot designs,
481 in which the whole-plots or split-plots or both can be freely exchangeable.")
482    (license license:gpl2+)))
484 (define-public r-plyr
485   (package
486     (name "r-plyr")
487     (version "1.8.4")
488     (source
489      (origin
490        (method url-fetch)
491        (uri (cran-uri "plyr" version))
492        (sha256
493         (base32 "1igar5pcjqh0jyxv0z3jah8rz617vfa86vw0r5c7c031b7bj5db0"))))
494     (build-system r-build-system)
495     (native-inputs `(("r-rcpp" ,r-rcpp)))
496     (home-page "http://had.co.nz/plyr")
497     (synopsis "Tools for Splitting, Applying and Combining Data")
498     (description
499      "Plyr is a set of tools that solves a common set of problems: you need to
500 break a big problem down into manageable pieces, operate on each piece and
501 then put all the pieces back together.  For example, you might want to fit a
502 model to each spatial location or time point in your study, summarise data by
503 panels or collapse high-dimensional arrays to simpler summary statistics.")
504     (license license:expat)))
506 (define-public r-proto
507   (package
508     (name "r-proto")
509     (version "1.0.0")
510     (source
511      (origin
512        (method url-fetch)
513        (uri (cran-uri "proto" version))
514        (sha256
515         (base32 "1l843p8vckjckdhgv37ngv47fga5jzy0n00pmipvp05nnaixk54j"))))
516     (build-system r-build-system)
517     (home-page "https://github.com/hadley/proto")
518     (synopsis "Prototype object-based programming")
519     (description
520      "Proto is an object oriented system using object-based, also called
521 prototype-based, rather than class-based object oriented ideas.")
522     (license license:gpl2+)))
524 (define-public r-rcolorbrewer
525   (package
526     (name "r-rcolorbrewer")
527     (version "1.1-2")
528     (source
529      (origin
530        (method url-fetch)
531        (uri (cran-uri "RColorBrewer" version))
532        (sha256
533         (base32 "1pfcl8z1pnsssfaaz9dvdckyfnnc6rcq56dhislbf571hhg7isgk"))))
534     (build-system r-build-system)
535     (home-page "http://cran.r-project.org/web/packages/RColorBrewer")
536     (synopsis "ColorBrewer palettes")
537     (description
538      "This package provides color schemes for maps (and other graphics)
539 designed by Cynthia Brewer as described at http://colorbrewer2.org")
540     ;; Includes code licensed under bsd-4
541     (license license:asl2.0)))
543 (define-public r-sendmailr
544   (package
545     (name "r-sendmailr")
546     (version "1.2-1")
547     (source
548      (origin
549        (method url-fetch)
550        (uri (cran-uri "sendmailR" version))
551        (sha256
552         (base32
553          "0z7ipywnzgkhfvl4zb2fjwl1xq7b5wib296vn9c9qgbndj6b1zh4"))))
554     (properties `((upstream-name . "sendmailR")))
555     (build-system r-build-system)
556     (propagated-inputs
557      `(("r-base64enc" ,r-base64enc)))
558     (home-page
559      "http://cran.r-project.org/web/packages/sendmailR")
560     (synopsis "Send email using R")
561     (description
562      "This package contains a simple SMTP client which provides a portable
563 solution for sending email, including attachments, from within R.")
564     (license license:gpl2+)))
566 (define-public r-stringi
567   (package
568     (name "r-stringi")
569     (version "1.1.2")
570     (source
571      (origin
572        (method url-fetch)
573        (uri (cran-uri "stringi" version))
574        (sha256
575         (base32
576          "13i1p6j8mx31hsw2s4c2phm2llrrdakzixkm6i0axsxprri722z5"))))
577     (build-system r-build-system)
578     (inputs `(("icu4c" ,icu4c)))
579     (native-inputs `(("pkg-config" ,pkg-config)))
580     (home-page "http://stringi.rexamine.com/")
581     (synopsis "Character string processing facilities")
582     (description
583      "This package allows for fast, correct, consistent, portable, as well as
584 convenient character string/text processing in every locale and any native
585 encoding.  Owing to the use of the ICU library, the package provides R users
586 with platform-independent functions known to Java, Perl, Python, PHP, and Ruby
587 programmers.  Among available features there are: pattern searching
588  (e.g.  via regular expressions), random string generation, string collation,
589 transliteration, concatenation, date-time formatting and parsing, etc.")
590     (license license:bsd-3)))
592 (define-public r-stringr
593   (package
594     (name "r-stringr")
595     (version "1.1.0")
596     (source
597      (origin
598        (method url-fetch)
599        (uri (cran-uri "stringr" version))
600        (sha256
601         (base32 "0css5j4psl80br75chg6s1s3ipzf89f71bnbys34flp9yghg1cfc"))))
602     (build-system r-build-system)
603     (propagated-inputs
604      `(("r-magrittr" ,r-magrittr)
605        ("r-stringi" ,r-stringi)))
606     (home-page "https://github.com/hadley/stringr")
607     (synopsis "Simple, consistent wrappers for common string operations")
608     (description
609      "Stringr is a consistent, simple and easy to use set of wrappers around
610 the fantastic 'stringi' package.  All function and argument names (and
611 positions) are consistent, all functions deal with \"NA\"'s and zero length
612 vectors in the same way, and the output from one function is easy to feed into
613 the input of another.")
614     (license license:gpl2+)))
616 (define-public r-reshape2
617   (package
618     (name "r-reshape2")
619     (version "1.4.2")
620     (source
621      (origin
622        (method url-fetch)
623        (uri (cran-uri "reshape2" version))
624        (sha256
625         (base32 "0swvjmc9f8cvkrsz463cp6snd8bncbv6q8yrfrb4rgkr0dhq6dvd"))))
626     (build-system r-build-system)
627     (propagated-inputs
628      `(("r-plyr" ,r-plyr)
629        ("r-rcpp" ,r-rcpp)
630        ("r-stringr" ,r-stringr)))
631     (home-page "https://github.com/hadley/reshape")
632     (synopsis "Flexibly reshape data: a reboot of the \"reshape\" package")
633     (description
634      "Reshape2 is an R library to flexibly restructure and aggregate data
635 using just two functions: melt and dcast (or acast).")
636     (license license:expat)))
638 (define-public r-scales
639   (package
640     (name "r-scales")
641     (version "0.4.0")
642     (source
643      (origin
644        (method url-fetch)
645        (uri (cran-uri "scales" version))
646        (sha256
647         (base32 "19y6q4j8vpmc73dnn4ncp5wj44gri7m77ys3z2rn3crrcc9zc7l5"))))
648     (build-system r-build-system)
649     (propagated-inputs
650      `(("r-dichromat" ,r-dichromat)
651        ("r-labeling" ,r-labeling)
652        ("r-munsell" ,r-munsell)
653        ("r-plyr" ,r-plyr)
654        ("r-rcolorbrewer" ,r-rcolorbrewer)
655        ("r-rcpp" ,r-rcpp)))
656     (home-page "https://github.com/hadley/scales")
657     (synopsis "Scale functions for visualization")
658     (description
659      "This package provides graphical scales that map data to aesthetics, and
660 provides methods for automatically determining breaks and labels for axes and
661 legends.")
662     (license license:expat)))
664 (define-public r-ggplot2
665   (package
666     (name "r-ggplot2")
667     (version "2.1.0")
668     (source
669      (origin
670        (method url-fetch)
671        (uri (cran-uri "ggplot2" version))
672        (sha256
673         (base32 "0s9rvp0f736ji6p9xpxq54agxf95pjkql4sj7ag0hv2xhnp27hzj"))))
674     (build-system r-build-system)
675     (propagated-inputs
676      `(("r-digest" ,r-digest)
677        ("r-gtable" ,r-gtable)
678        ("r-plyr" ,r-plyr)
679        ("r-proto" ,r-proto)
680        ("r-reshape2" ,r-reshape2)
681        ("r-scales" ,r-scales)
682        ("r-svglite" ,r-svglite)))
683     (home-page "http://ggplot2.org")
684     (synopsis "An implementation of the grammar of graphics")
685     (description
686      "Ggplot2 is an implementation of the grammar of graphics in R.  It
687 combines the advantages of both base and lattice graphics: conditioning and
688 shared axes are handled automatically, and you can still build up a plot step
689 by step from multiple data sources.  It also implements a sophisticated
690 multidimensional conditioning system and a consistent interface to map data to
691 aesthetic attributes.")
692     (license license:gpl2+)))
694 (define-public r-gdtools
695   (package
696     (name "r-gdtools")
697     (version "0.1.1")
698     (source
699      (origin
700        (method url-fetch)
701        (uri (cran-uri "gdtools" version))
702        (sha256
703         (base32
704          "1l9d759x9s4ddz51sls8kcjps2i9kwfbc72dnagrdavh82h0al8n"))))
705     (build-system r-build-system)
706     (native-inputs
707      `(("r-rcpp" ,r-rcpp)
708        ("pkg-config" ,pkg-config)))
709     (inputs
710      `(("cairo" ,cairo)))
711     (propagated-inputs
712      `(("r-withr" ,r-withr)))
713     (home-page "http://cran.r-project.org/web/packages/gdtools")
714     (synopsis "Utilities for graphical rendering")
715     (description
716      "The @code{gdtools} package provides functionalities to get font metrics
717 and to generate base64 encoded string from raster matrix.")
718     (license license:gpl3)))
720 (define-public r-svglite
721   (package
722     (name "r-svglite")
723     (version "1.1.0")
724     (source
725      (origin
726        (method url-fetch)
727        (uri (cran-uri "svglite" version))
728        (sha256
729         (base32
730          "11ryicjglfi6jvkk4jgg5kra42qbs5z2zid7jjhlslpjcljfwc70"))))
731     (build-system r-build-system)
732     (native-inputs  `(("r-rcpp" ,r-rcpp)))
733     (propagated-inputs
734      `(("r-bh" ,r-bh)
735        ("r-gdtools" ,r-gdtools)))
736     (home-page "https://github.com/hadley/svglite")
737     (synopsis "SVG graphics device")
738     (description
739      "@code{svglite} is a graphics device that produces clean
740 @dfn{SVG} (Scalable Vector Graphics) output, suitable for use on the web, or
741 hand editing.  Compared to the built-in @code{svg()}, @code{svglite} is
742 considerably faster, produces smaller files, and leaves text as is.")
743     (license license:gpl2+)))
745 (define-public r-assertthat
746   (package
747     (name "r-assertthat")
748     (version "0.1")
749     (source (origin
750               (method url-fetch)
751               (uri (cran-uri "assertthat" version))
752               (sha256
753                (base32
754                 "0dwsqajyglfscqilj843qfqn1ndbqpswa7b4l1d633qjk9d68qqk"))))
755     (build-system r-build-system)
756     (home-page "https://github.com/hadley/assertthat")
757     (synopsis "Easy pre and post assertions")
758     (description
759      "Assertthat is an extension to stopifnot() that makes it easy to declare
760 the pre and post conditions that your code should satisfy, while also
761 producing friendly error messages so that your users know what they've done
762 wrong.")
763     (license license:gpl3+)))
765 (define-public r-lazyeval
766   (package
767     (name "r-lazyeval")
768     (version "0.2.0")
769     (source (origin
770               (method url-fetch)
771               (uri (cran-uri "lazyeval" version))
772               (sha256
773                (base32
774                 "1jwdz40nznlc44hpjli7h98gnpa4d98ifggmj7z88h84n9aqywqk"))))
775     (build-system r-build-system)
776     (home-page "https://github.com/hadley/lazyeval")
777     (synopsis "Lazy (non-standard) evaluation in R")
778     (description
779      "This package provides the tools necessary to do non-standard
780 evaluation (NSE) in R.")
781     (license license:gpl3+)))
783 (define-public r-dbi
784   (package
785     (name "r-dbi")
786     (version "0.5-1")
787     (source (origin
788               (method url-fetch)
789               (uri (cran-uri "DBI" version))
790               (sha256
791                (base32
792                 "1idwm9lkmz6ns6h0vvgml18mg0k7vjqiv9p5svrdcmx7r1rirpdi"))))
793     (build-system r-build-system)
794     (home-page "https://github.com/rstats-db/DBI")
795     (synopsis "R database interface")
796     (description
797      "The DBI package provides a database interface (DBI) definition for
798 communication between R and relational database management systems.  All
799 classes in this package are virtual and need to be extended by the various
800 R/DBMS implementations.")
801     (license license:lgpl2.0+)))
803 (define-public r-bh
804   (package
805     (name "r-bh")
806     (version "1.60.0-2")
807     (source (origin
808               (method url-fetch)
809               (uri (cran-uri "BH" version))
810               (sha256
811                (base32
812                 "136497fng9bcvrf8favpj8inz96pxdwp1rrb2k00sxjxjbgawhg4"))))
813     (build-system r-build-system)
814     (home-page "https://github.com/eddelbuettel/bh")
815     (synopsis "R package providing subset of Boost headers")
816     (description
817      "This package aims to provide the most useful subset of Boost libraries
818 for template use among CRAN packages.")
819     (license license:boost1.0)))
821 (define-public r-evaluate
822   (package
823     (name "r-evaluate")
824     (version "0.10")
825     (source (origin
826               (method url-fetch)
827               (uri (cran-uri "evaluate" version))
828               (sha256
829                (base32
830                 "0mwna7rjyrmc76651a1fm7c76ippdsc2wsp3sj3iwb1c73mvlqv1"))))
831     (build-system r-build-system)
832     (propagated-inputs
833      `(("r-stringr" ,r-stringr)))
834     (home-page "https://github.com/hadley/evaluate")
835     (synopsis "Parsing and evaluation tools for R")
836     (description
837      "This package provides tools that allow you to recreate the parsing,
838 evaluation and display of R code, with enough information that you can
839 accurately recreate what happens at the command line.  The tools can easily be
840 adapted for other output formats, such as HTML or LaTeX.")
841     (license license:gpl3+)))
843 (define-public r-formatr
844   (package
845     (name "r-formatr")
846     (version "1.4")
847     (source (origin
848               (method url-fetch)
849               (uri (cran-uri "formatR" version))
850               (sha256
851                (base32
852                 "1fvynq0fj1r9grg9vvfdh5fl2riv6qki9f2rfpyvbvqq3xxpmi3f"))))
853     (build-system r-build-system)
854     (home-page "http://yihui.name/formatR")
855     (synopsis "Format R code automatically")
856     (description
857      "This package provides a function to format R source code.  Spaces and
858 indent will be added to the code automatically, and comments will be preserved
859 under certain conditions, so that R code will be more human-readable and tidy.
860 There is also a Shiny app as a user interface in this package.")
861     (license license:gpl3+)))
863 (define-public r-highr
864   (package
865     (name "r-highr")
866     (version "0.6")
867     (source (origin
868               (method url-fetch)
869               (uri (cran-uri "highr" version))
870               (sha256
871                (base32
872                 "0n9v44dxdy5fhkdmpbpa2p78whyd9z3rhhy42ipdz5m5vsr55qa3"))))
873     (build-system r-build-system)
874     (home-page "https://github.com/yihui/highr")
875     (synopsis "Syntax highlighting for R source code")
876     (description
877      "This package provides syntax highlighting for R source code.  Currently
878 it supports LaTeX and HTML output.  Source code of other languages is
879 supported via Andre Simon's highlight package.")
880     (license license:gpl3+)))
882 (define-public r-mime
883   (package
884     (name "r-mime")
885     (version "0.5")
886     (source (origin
887               (method url-fetch)
888               (uri (cran-uri "mime" version))
889               (sha256
890                (base32
891                 "0i91m3ivaja1k33jwcvz16pfjypkci27awm8glil7sxhmwaj3izw"))))
892     (build-system r-build-system)
893     (home-page "https://github.com/yihui/mime")
894     (synopsis "R package to map filenames to MIME types")
895     (description
896      "This package guesses the MIME type from a filename extension using the
897 data derived from /etc/mime.types in UNIX-type systems.")
898     (license license:gpl2)))
900 (define-public r-markdown
901   (package
902     (name "r-markdown")
903     (version "0.7.7")
904     (source (origin
905               (method url-fetch)
906               (uri (cran-uri "markdown" version))
907               (sha256
908                (base32
909                 "00j1hlib3il50azs2vlcyhi0bjpx1r50mxr9w9dl5g1bwjjc71hb"))))
910     (build-system r-build-system)
911     ;; Skip check phase because the tests require the r-knitr package to be
912     ;; installed. This prevents installation failures. Knitr normally
913     ;; shouldn't be available since r-markdown is a dependency of the r-knitr
914     ;; package.
915     (arguments `(#:tests? #f))
916     (propagated-inputs
917      `(("r-mime" ,r-mime)))
918     (home-page "https://github.com/rstudio/markdown")
919     (synopsis "Markdown rendering for R")
920     (description
921      "This package provides R bindings to the Sundown Markdown rendering
922 library (https://github.com/vmg/sundown).  Markdown is a plain-text formatting
923 syntax that can be converted to XHTML or other formats.")
924     (license license:gpl2)))
926 (define-public r-yaml
927   (package
928     (name "r-yaml")
929     (version "2.1.13")
930     (source (origin
931               (method url-fetch)
932               (uri (cran-uri "yaml" version))
933               (sha256
934                (base32
935                 "18kz5mfn7qpif5pn91w4vbrc5bkycsj85vwm5wxwzjlb02i9mxi6"))))
936     (build-system r-build-system)
937     (home-page "https://cran.r-project.org/web/packages/yaml/")
938     (synopsis "Methods to convert R data to YAML and back")
939     (description
940      "This package implements the libyaml YAML 1.1 parser and
941 emitter (http://pyyaml.org/wiki/LibYAML) for R.")
942     (license license:bsd-3)))
944 (define-public r-knitr
945   (package
946     (name "r-knitr")
947     (version "1.14")
948     (source (origin
949               (method url-fetch)
950               (uri (cran-uri "knitr" version))
951               (sha256
952                (base32
953                 "1v0s0knb294p7a2xkwy35bhg0w8p3qcgyphd748sj86hh8a30vds"))))
954     (build-system r-build-system)
955     (propagated-inputs
956      `(("r-evaluate" ,r-evaluate)
957        ("r-digest" ,r-digest)
958        ("r-formatr" ,r-formatr)
959        ("r-highr" ,r-highr)
960        ("r-markdown" ,r-markdown)
961        ("r-stringr" ,r-stringr)
962        ("r-yaml" ,r-yaml)))
963     (home-page "http://yihui.name/knitr/")
964     (synopsis "General-purpose package for dynamic report generation in R")
965     (description
966      "This package provides a general-purpose tool for dynamic report
967 generation in R using Literate Programming techniques.")
968     ;; The code is released under any version of the GPL.  As it is used by
969     ;; r-markdown which is available under GPLv2 only, we have chosen GPLv2+
970     ;; here.
971     (license license:gpl2+)))
973 (define-public r-knitrbootstrap
974   (package
975     (name "r-knitrbootstrap")
976     (version "1.0.0")
977     (source
978      (origin
979        (method url-fetch)
980        (uri (cran-uri "knitrBootstrap" version))
981        (sha256
982         (base32
983          "0pshn2slzqwpryklslsxwh1dmqcnwv6bwi7yfm6m342wjybpk0wl"))))
984     (properties `((upstream-name . "knitrBootstrap")))
985     (build-system r-build-system)
986     (propagated-inputs
987      `(("r-knitr" ,r-knitr)
988        ("r-rmarkdown" ,r-rmarkdown)))
989     (home-page "https://github.com/jimhester/knitrBootstrap")
990     (synopsis "Knitr bootstrap framework")
991     (description
992      "This package provides a framework to create Bootstrap 3 HTML reports
993 from knitr Rmarkdown.")
994     (license license:expat)))
996 (define-public r-microbenchmark
997   (package
998     (name "r-microbenchmark")
999     (version "1.4-2.1")
1000     (source (origin
1001               (method url-fetch)
1002               (uri (cran-uri "microbenchmark" version))
1003               (sha256
1004                (base32
1005                 "0qn5r1a6qidghcisc2hpbdmj62pnixc3zz6p4ipk8mvakf0hdsvg"))))
1006     (build-system r-build-system)
1007     (propagated-inputs
1008      `(("r-ggplot2" ,r-ggplot2)))
1009     (home-page "https://cran.r-project.org/web/packages/microbenchmark/")
1010     (synopsis "Accurate timing functions for R")
1011     (description
1012      "This package provides infrastructure to accurately measure and compare
1013 the execution time of R expressions.")
1014     (license license:bsd-2)))
1016 (define-public r-codetools
1017   (package
1018     (name "r-codetools")
1019     (version "0.2-14")
1020     (source (origin
1021               (method url-fetch)
1022               (uri (cran-uri "codetools" version))
1023               (sha256
1024                (base32
1025                 "0y9r4m2b8xgavr89sc179knzwpz54xljbc1dinpq2q07i4xn0397"))))
1026     (build-system r-build-system)
1027     (home-page "https://cran.r-project.org/web/packages/codetools/index.html")
1028     (synopsis "Code analysis tools for R")
1029     (description "This package provides code analysis tools for R.")
1030     (license license:gpl3+)))
1032 (define-public r-pryr
1033   (package
1034     (name "r-pryr")
1035     (version "0.1.2")
1036     (source (origin
1037               (method url-fetch)
1038               (uri (cran-uri "pryr" version))
1039               (sha256
1040                (base32
1041                 "1in350a8hxwf580afavasvn3jc7x2p1b7nlwmj1scakfz74vghk5"))))
1042     (build-system r-build-system)
1043     (propagated-inputs
1044      `(("r-stringr" ,r-stringr)
1045        ("r-codetools" ,r-codetools)))
1046     (native-inputs
1047      `(("r-rcpp" ,r-rcpp)))
1048     (home-page "https://github.com/hadley/pryr")
1049     (synopsis "Tools for computing on the R language")
1050     (description
1051      "This package provides useful tools to pry back the covers of R and
1052 understand the language at a deeper level.")
1053     (license license:gpl2)))
1055 (define-public r-memoise
1056   (package
1057     (name "r-memoise")
1058     (version "1.0.0")
1059     (source (origin
1060               (method url-fetch)
1061               (uri (cran-uri "memoise" version))
1062               (sha256
1063                (base32
1064                 "0sq2dhpvxy17v1baj256r0jnygdy3m5a8x4zh6vhv29957qnq6zx"))))
1065     (build-system r-build-system)
1066     (propagated-inputs
1067      `(("r-digest" ,r-digest)))
1068     (home-page "http://github.com/hadley/memoise")
1069     (synopsis "Memoise functions for R")
1070     (description
1071      "This R package allows to cache the results of a function so that when
1072 you call it again with the same arguments it returns the pre-computed value.")
1073     (license license:expat)))
1075 (define-public r-crayon
1076   (package
1077     (name "r-crayon")
1078     (version "1.3.2")
1079     (source (origin
1080               (method url-fetch)
1081               (uri (cran-uri "crayon" version))
1082               (sha256
1083                (base32
1084                 "0s2yam18slph7xsw4pyc9f92gdyf609r5w92yax69zh57kb7asws"))))
1085     (build-system r-build-system)
1086     (propagated-inputs
1087      `(("r-memoise" ,r-memoise)))
1088     (home-page "https://github.com/gaborcsardi/crayon")
1089     (synopsis "Colored terminal output for R")
1090     (description
1091      "Colored terminal output on terminals that support ANSI color and
1092 highlight codes.  It also works in Emacs ESS.  ANSI color support is
1093 automatically detected.  Colors and highlighting can be combined and nested.
1094 New styles can also be created easily.  This package was inspired by the
1095 \"chalk\" JavaScript project.")
1096     (license license:expat)))
1098 (define-public r-praise
1099   (package
1100     (name "r-praise")
1101     (version "1.0.0")
1102     (source
1103      (origin
1104        (method url-fetch)
1105        (uri (cran-uri "praise" version))
1106        (sha256
1107         (base32
1108          "1gfyypnvmih97p2r0php9qa39grzqpsdbq5g0fdsbpq5zms5w0sw"))))
1109     (build-system r-build-system)
1110     (home-page "https://github.com/gaborcsardi/praise")
1111     (synopsis "Functions to praise users")
1112     (description
1113      "This package provides template functions to assist in building friendly
1114 R packages that praise their users.")
1115     (license license:expat)))
1117 (define-public r-testthat
1118   (package
1119     (name "r-testthat")
1120     (version "1.0.2")
1121     (source (origin
1122               (method url-fetch)
1123               (uri (cran-uri "testthat" version))
1124               (sha256
1125                (base32
1126                 "0pj1r01x4ny4capr83dfa19hi5i2sjjxky99schzip8zrq5dzxqf"))))
1127     (build-system r-build-system)
1128     (propagated-inputs
1129      `(("r-digest" ,r-digest)
1130        ("r-crayon" ,r-crayon)
1131        ("r-magrittr" ,r-magrittr)
1132        ("r-praise" ,r-praise)
1133        ("r-r6" ,r-r6)))
1134     (home-page "https://github.com/hadley/testthat")
1135     (synopsis "Unit testing for R")
1136     (description
1137      "This package provides a unit testing system for R designed to be fun,
1138 flexible and easy to set up.")
1139     (license license:expat)))
1141 (define-public r-r6
1142   (package
1143     (name "r-r6")
1144     (version "2.2.0")
1145     (source (origin
1146               (method url-fetch)
1147               (uri (cran-uri "R6" version))
1148               (sha256
1149                (base32
1150                 "1ir51pb0y6yj05qaxsflk4a6hv8n73cwlb0qajcskbrz632dsyvx"))))
1151     (build-system r-build-system)
1152     (home-page "https://github.com/wch/R6/")
1153     (synopsis "Classes with reference semantics in R")
1154     (description
1155      "The R6 package allows the creation of classes with reference semantics,
1156 similar to R's built-in reference classes.  Compared to reference classes, R6
1157 classes are simpler and lighter-weight, and they are not built on S4 classes
1158 so they do not require the methods package.  These classes allow public and
1159 private members, and they support inheritance, even when the classes are
1160 defined in different packages.")
1161     (license license:expat)))
1163 (define-public r-tibble
1164   (package
1165     (name "r-tibble")
1166     (version "1.2")
1167     (source
1168      (origin
1169        (method url-fetch)
1170        (uri (cran-uri "tibble" version))
1171        (sha256
1172         (base32
1173          "011i352ylq9b4xfcj7h10h7qsqd9qkc1rzc0pr1gf8qjb788p2pd"))))
1174     (build-system r-build-system)
1175     (propagated-inputs
1176      `(("r-assertthat" ,r-assertthat)
1177        ("r-lazyeval" ,r-lazyeval)
1178        ("r-rcpp" ,r-rcpp)))
1179     (home-page "https://github.com/hadley/tibble")
1180     (synopsis "Simple data frames")
1181     (description
1182      "This package provides a @code{tbl_df} class that offers better checking
1183 and printing capabilities than traditional data frames.")
1184     (license license:expat)))
1186 (define-public r-dplyr
1187   (package
1188     (name "r-dplyr")
1189     (version "0.5.0")
1190     (source (origin
1191               (method url-fetch)
1192               (uri (cran-uri "dplyr" version))
1193               (sha256
1194                (base32
1195                 "0ks5cklb03laqf5ygcw986g1lv7wk1ipvypjlha8xly2y4lvilwk"))))
1196     (build-system r-build-system)
1197     (propagated-inputs
1198      `(("r-assertthat" ,r-assertthat)
1199        ("r-r6" ,r-r6)
1200        ("r-magrittr" ,r-magrittr)
1201        ("r-lazyeval" ,r-lazyeval)
1202        ("r-dbi" ,r-dbi)
1203        ("r-tibble" ,r-tibble)))
1204     (native-inputs
1205      `(("r-rcpp" ,r-rcpp)
1206        ("r-bh" ,r-bh)))
1207     (home-page "https://github.com/hadley/dplyr")
1208     (synopsis "Tools for working with data frames in R")
1209     (description
1210      "dplyr is the next iteration of plyr.  It is focussed on tools for
1211 working with data frames.  It has three main goals: 1) identify the most
1212 important data manipulation tools needed for data analysis and make them easy
1213 to use in R; 2) provide fast performance for in-memory data by writing key
1214 pieces of code in C++; 3) use the same code interface to work with data no
1215 matter where it is stored, whether in a data frame, a data table or
1216 database.")
1217     (license license:expat)))
1219 (define-public r-acepack
1220   (package
1221     (name "r-acepack")
1222     (version "1.4.1")
1223     (source
1224      (origin
1225        (method url-fetch)
1226        (uri (cran-uri "acepack" version))
1227        (sha256
1228         (base32
1229          "1f98rpfjmhd92rdc3j004plyfpjailz6j0ycysbac0kgj83haxc2"))))
1230     (build-system r-build-system)
1231     (inputs
1232      `(("gfortran" ,gfortran)))
1233     (home-page "http://cran.r-project.org/web/packages/acepack")
1234     (synopsis "Functions for regression transformations")
1235     (description
1236      "This package provides ACE and AVAS methods for choosing regression
1237 transformations.")
1238     (license license:expat)))
1240 (define-public r-cluster
1241   (package
1242     (name "r-cluster")
1243     (version "2.0.5")
1244     (source
1245      (origin
1246        (method url-fetch)
1247        (uri (cran-uri "cluster" version))
1248        (sha256
1249         (base32
1250          "1bkvqmv8h2c423q9ag2afb6s9j2vcdlxsf559zzbimraphrr2c2b"))))
1251     (build-system r-build-system)
1252     (inputs
1253      `(("gfortran" ,gfortran)))
1254     (home-page "http://cran.r-project.org/web/packages/cluster")
1255     (synopsis "Methods for data cluster analysis")
1256     (description
1257      "This package provides tools that are useful in finding groups in data.
1258 It is based on the methods described in Kaufman and Rousseeuw (1990) \"Finding
1259 Groups in Data\".")
1260     (license license:gpl2+)))
1262 (define-public r-foreign
1263   (package
1264     (name "r-foreign")
1265     (version "0.8-67")
1266     (source
1267      (origin
1268        (method url-fetch)
1269        (uri (cran-uri "foreign" version))
1270        (sha256
1271         (base32
1272          "1mcrm2pydimbyjhkrw5h380bifj1jhwzifph1xgh90asf3lvd1xd"))))
1273     (build-system r-build-system)
1274     (home-page "http://cran.r-project.org/web/packages/foreign")
1275     (synopsis "Read data stored by other statistics software in R")
1276     (description
1277      "This package provides functions for reading and writing data stored by
1278 some versions of Epi Info, Minitab, S, SAS, SPSS, Stata, Systat and Weka, and
1279 for reading and writing some dBase files.")
1280     (license license:gpl2+)))
1282 (define-public r-formula
1283   (package
1284     (name "r-formula")
1285     (version "1.2-1")
1286     (source
1287      (origin
1288        (method url-fetch)
1289        (uri (cran-uri "Formula" version))
1290        (sha256
1291         (base32
1292          "02in5325zzrqbhlygx6s0dinj6ymw845q70y56frqacv25ayzcax"))))
1293     (properties `((upstream-name . "Formula")))
1294     (build-system r-build-system)
1295     (home-page "http://cran.r-project.org/web/packages/Formula")
1296     (synopsis "Extended model formulas")
1297     (description
1298      "This package provides a new class @code{Formula}, which extends the base
1299 class @code{formula}.  It supports extended formulas with multiple parts of
1300 regressors on the right-hand side and/or multiple responses on the left-hand
1301 side.")
1302     (license (list license:gpl2+ license:gpl3+))))
1304 (define-public r-locfit
1305   (package
1306     (name "r-locfit")
1307     (version "1.5-9.1")
1308     (source
1309      (origin
1310        (method url-fetch)
1311        (uri (cran-uri "locfit" version))
1312        (sha256
1313         (base32
1314          "0lafrmq1q7x026m92h01hc9cjjiximqqi3v1g2hw7ai9vf7i897m"))))
1315     (build-system r-build-system)
1316     (home-page "http://cran.r-project.org/web/packages/locfit")
1317     (synopsis "Local regression, likelihood and density estimation")
1318     (description
1319      "This package provides functions used for local regression, likelihood
1320 and density estimation.")
1321     (license (list license:gpl2+ license:gpl3+))))
1323 (define-public r-chron
1324   (package
1325     (name "r-chron")
1326     (version "2.3-47")
1327     (source (origin
1328               (method url-fetch)
1329               (uri (cran-uri "chron" version))
1330               (sha256
1331                (base32
1332                 "1xj50kk8b8mbjpszp8i0wbripb5a4b36jcscwlbyap8n4487g34s"))))
1333     (build-system r-build-system)
1334     (home-page "http://cran.r-project.org/web/packages/chron")
1335     (synopsis "Chronological R objects which can handle dates and times")
1336     (description
1337      "This package provides chronological R objects which can handle dates and
1338 times.")
1339     (license license:gpl2)))
1341 (define-public r-data-table
1342   (package
1343     (name "r-data-table")
1344     (version "1.9.6")
1345     (source (origin
1346               (method url-fetch)
1347               (uri (cran-uri "data.table" version))
1348               (sha256
1349                (base32
1350                 "0vi3zplpxqbg78z9ifjfs1kl2i8qhkqxr7l9ysp2663kq54w6x3g"))))
1351     (build-system r-build-system)
1352     (propagated-inputs
1353      `(("r-chron" ,r-chron)))
1354     (home-page "https://github.com/Rdatatable/data.table/wiki")
1355     (synopsis "Enhanced version of data.frame R object")
1356     (description
1357      "The R package @code{data.table} is an extension of @code{data.frame}
1358 providing functions for fast aggregation of large data (e.g. 100GB in RAM),
1359 fast ordered joins, fast add/modify/delete of columns by group, column listing
1360 and fast file reading.")
1361     (license license:gpl3+)))
1363 (define-public r-xtable
1364   (package
1365     (name "r-xtable")
1366     (version "1.8-2")
1367     (source
1368      (origin
1369        (method url-fetch)
1370        (uri (cran-uri "xtable" version))
1371        (sha256
1372         (base32
1373          "0398qkpvlw3dv0myz4mjcyqwpwc2m31l127r8vdzwc71wb6s28qn"))))
1374     (build-system r-build-system)
1375     (native-inputs
1376      `(("r-knitr" ,r-knitr)))
1377     (home-page "http://xtable.r-forge.r-project.org/")
1378     (synopsis "Export R tables to LaTeX or HTML")
1379     (description
1380      "This package provides tools to export R data as LaTeX and HTML tables.")
1381     (license license:gpl2+)))
1383 (define-public python-patsy
1384   (package
1385     (name "python-patsy")
1386     (version "0.4.1")
1387     (source (origin
1388               (method url-fetch)
1389               (uri (pypi-uri "patsy" version ".zip"))
1390               (sha256
1391                (base32
1392                 "1m6knyq8hbqlx242y4da02j0x86j4qggs1j7q186w3jv0j0c476w"))))
1393     (build-system python-build-system)
1394     (arguments
1395      `(#:phases
1396        (modify-phases %standard-phases
1397          (replace 'check (lambda _ (zero? (system* "nosetests" "-v"))))
1398          (add-after 'unpack 'prevent-generation-of-egg-archive
1399           (lambda _
1400             (substitute* "setup.py"
1401               (("from setuptools import setup")
1402                "from distutils.core import setup"))
1403             #t)))))
1404     (propagated-inputs
1405      `(("python-numpy" ,python-numpy)
1406        ("python-scipy" ,python-scipy)
1407        ("python-six" ,python-six)))
1408     (native-inputs
1409      `(("python-nose" ,python-nose)
1410        ("unzip" ,unzip)))
1411     (home-page "https://github.com/pydata/patsy")
1412     (synopsis "Describe statistical models and build design matrices")
1413     (description
1414      "Patsy is a Python package for describing statistical models and for
1415 building design matrices.")
1416     ;; The majority of the code is distributed under BSD-2.  The module
1417     ;; patsy.compat contains code derived from the Python standard library,
1418     ;; and is covered by the PSFL.
1419     (license (list license:bsd-2 license:psfl))
1420     (properties `((python2-variant . ,(delay python2-patsy))))))
1422 (define-public python2-patsy
1423   (let ((patsy (package-with-python2 (strip-python2-variant python-patsy))))
1424     (package (inherit patsy)
1425       (native-inputs
1426        `(("python2-setuptools" ,python2-setuptools)
1427          ,@(package-native-inputs patsy))))))
1429 (define-public python-statsmodels
1430   (package
1431     (name "python-statsmodels")
1432     (version "0.6.1")
1433     (source
1434      (origin
1435        (method url-fetch)
1436        (uri (string-append "https://pypi.python.org/packages/source/"
1437                            "s/statsmodels/statsmodels-" version ".tar.gz"))
1438        (sha256
1439         (base32
1440          "0xn67sqr0cc1lmlhzm71352hrb4hw7g318p5ff5q97pc98vl8kmy"))
1441        (patches (search-patches "python-statsmodels-fix-tests.patch"))))
1442     (build-system python-build-system)
1443     (arguments
1444      `(#:phases
1445        (modify-phases %standard-phases
1446          ;; tests must be run after installation
1447          (delete 'check)
1448          (add-after 'unpack 'set-matplotlib-backend-to-agg
1449           (lambda _
1450             ;; Set the matplotlib backend to Agg to avoid problems using the
1451             ;; GTK backend without a display.
1452             (substitute* (find-files "statsmodels/graphics/tests" "\\.py")
1453               (("import matplotlib\\.pyplot as plt" line)
1454                (string-append "import matplotlib;matplotlib.use('Agg');"
1455                               line)))
1456             #t))
1457          (add-after 'install 'check
1458           (lambda _
1459             (with-directory-excursion "/tmp"
1460               (zero? (system* "nosetests"
1461                               "--stop"
1462                               "-v" "statsmodels"))))))))
1463     (propagated-inputs
1464      `(("python-numpy" ,python-numpy)
1465        ("python-scipy" ,python-scipy)
1466        ("python-pandas" ,python-pandas)
1467        ("python-patsy" ,python-patsy)
1468        ("python-matplotlib" ,python-matplotlib)))
1469     (native-inputs
1470      `(("python-cython" ,python-cython)
1471        ("python-nose" ,python-nose)
1472        ("python-sphinx" ,python-sphinx)))
1473     (home-page "http://statsmodels.sourceforge.net/")
1474     (synopsis "Statistical modeling and econometrics in Python")
1475     (description
1476      "Statsmodels is a Python package that provides a complement to scipy for
1477 statistical computations including descriptive statistics and estimation and
1478 inference for statistical models.")
1479     (license license:bsd-3)))
1481 (define-public python2-statsmodels
1482   (let ((stats (package-with-python2 python-statsmodels)))
1483     (package (inherit stats)
1484       (propagated-inputs
1485        `(("python2-pytz" ,python2-pytz)
1486          ("python2-numpy" ,python2-numpy)
1487          ("python2-scipy" ,python2-scipy)
1488          ("python2-pandas" ,python2-pandas)
1489          ("python2-patsy" ,python2-patsy)
1490          ("python2-matplotlib" ,python2-matplotlib)))
1491       (native-inputs
1492        `(("python2-setuptools" ,python2-setuptools)
1493          ,@(package-native-inputs stats))))))
1495 (define-public r-coda
1496   (package
1497     (name "r-coda")
1498     (version "0.18-1")
1499     (source (origin
1500               (method url-fetch)
1501               (uri (cran-uri "coda" version))
1502               (sha256
1503                (base32
1504                 "03sc780734zj2kqcm8lkyvf76fql0jbfhkblpn8l58zmb6cqi958"))))
1505     (build-system r-build-system)
1506     (propagated-inputs
1507      `(("r-lattice" ,r-lattice)))
1508     (home-page "http://cran.r-project.org/web/packages/coda")
1509     (synopsis "This is a package for Output Analysis and Diagnostics for MCMC")
1510     (description "This package provides functions for summarizing and plotting
1511 the output from Markov Chain Monte Carlo (MCMC) simulations, as well as
1512 diagnostic tests of convergence to the equilibrium distribution of the Markov
1513 chain.")
1514     (license license:gpl2+)))
1516 (define-public r-ade4
1517   (package
1518     (name "r-ade4")
1519     (version "1.7-4")
1520     (source
1521       (origin
1522         (method url-fetch)
1523         (uri (cran-uri "ade4" version))
1524         (sha256
1525           (base32
1526             "17sbicash7z4b63dlrbaf8xx2pbwh62vykzvhdjs43h8jkl881y7"))))
1527     (build-system r-build-system)
1528     (home-page "http://pbil.univ-lyon1.fr/ADE-4")
1529     (synopsis "Multivariate data analysis and graphical display")
1530     (description
1531      "The ade4 package contains data analysis functions to analyze ecological
1532 and environmental data in the framework of Euclidean exploratory methods.")
1533     (license license:gpl2+)))
1535 (define-public r-xml2
1536   (package
1537     (name "r-xml2")
1538     (version "1.0.0")
1539     (source
1540      (origin
1541        (method url-fetch)
1542        (uri (cran-uri "xml2" version))
1543        (sha256
1544         (base32
1545          "0f2alsrk3yykznbhnz4pcsg9mb72cv607vbapqx5kqfv39772kgr"))))
1546     (build-system r-build-system)
1547     (inputs
1548      `(("libxml2" ,libxml2)))
1549     (propagated-inputs
1550      `(("r-rcpp" ,r-rcpp)
1551        ("r-bh" ,r-bh)))
1552     (home-page "https://github.com/hadley/xml2")
1553     (synopsis "Parse XML with R")
1554     (description
1555      "This package provides a simple, consistent interface to working with XML
1556 files in R.  It is built on top of the libxml2 C library.")
1557     (license license:gpl2+)))
1559 (define-public r-multitaper
1560   (package
1561     (name "r-multitaper")
1562     (version "1.0-12")
1563     (source
1564      (origin
1565        (method url-fetch)
1566        (uri (cran-uri "multitaper" version))
1567        (sha256
1568         (base32
1569          "011qpkwpjclfc24y2qqigmdnikqwdnanflfhihigh5b5k7qwgm5j"))))
1570     (build-system r-build-system)
1571     (native-inputs
1572      `(("gfortran" ,gfortran)))
1573     (home-page "http://github.com/wesleyburr/multitaper/")
1574     (synopsis "Multitaper spectral analysis tools")
1575     (description
1576      "This package implements multitaper spectral estimation
1577 techniques using prolate spheroidal sequences (Slepians) and sine
1578 tapers for time series analysis.  It includes an adaptive weighted
1579 multitaper spectral estimate, a coherence estimate, Thomson's Harmonic
1580 F-test, and complex demodulation.  The Slepians sequences are
1581 generated efficiently using a tridiagonal matrix solution, and
1582 jackknifed confidence intervals are available for most estimates.")
1583     (license license:gpl2+)))
1585 (define-public r-rversions
1586   (package
1587     (name "r-rversions")
1588     (version "1.0.3")
1589     (source (origin
1590               (method url-fetch)
1591               (uri (cran-uri "rversions" version))
1592               (sha256
1593                (base32
1594                 "0i2gi05nrvknr7g89rbppkswyfcwwd4r9gp75fdfhpah8sgq1l11"))))
1595     (build-system r-build-system)
1596     (propagated-inputs
1597      `(("r-curl" ,r-curl)
1598        ("r-xml2" ,r-xml2)))
1599     (home-page "https://github.com/metacran/rversions")
1600     (synopsis "Query R versions, including 'r-release' and 'r-oldrel'")
1601     (description
1602      "This package provides functions to query the main R repository to find
1603 the versions that @code{r-release} and @code{r-oldrel} refer to, and also all
1604 previous R versions and their release dates.")
1605     (license license:expat)))
1607 (define-public r-whisker
1608   (package
1609     (name "r-whisker")
1610     (version "0.3-2")
1611     (source (origin
1612               (method url-fetch)
1613               (uri (cran-uri "whisker" version))
1614               (sha256
1615                (base32
1616                 "0z4cn115gxcl086d6bnqr8afi67b6a7xqg6ivmk3l4ng1x8kcj28"))))
1617     (build-system r-build-system)
1618     (home-page "http://github.com/edwindj/whisker")
1619     (synopsis "Logicless mustache templating for R")
1620     (description
1621      "This package provides logicless templating, with a syntax that is not
1622 limited to R.")
1623     (license license:gpl3+)))
1625 (define-public r-backports
1626   (package
1627     (name "r-backports")
1628     (version "1.0.4")
1629     (source
1630      (origin
1631        (method url-fetch)
1632        (uri (cran-uri "backports" version))
1633        (sha256
1634         (base32
1635          "0fssh5rnnvpp8wm0ml9gk765idwrgj07xyxpkhpidl9zwydxzif2"))))
1636     (build-system r-build-system)
1637     (home-page "http://cran.r-project.org/web/packages/backports")
1638     (synopsis "Reimplementations of functions introduced since R 3.0.0")
1639     (description
1640      "Provides implementations of functions which have been introduced in R
1641 since version 3.0.0.  The backports are conditionally exported which results
1642 in R resolving the function names to the version shipped with R (if available)
1643 and uses the implemented backports as fallback.  This way package developers
1644 can make use of the new functions without worrying about the minimum required
1645 R version.")
1646     (license license:gpl2+)))
1648 (define-public r-checkmate
1649   (package
1650     (name "r-checkmate")
1651     (version "1.8.2")
1652     (source
1653      (origin
1654        (method url-fetch)
1655        (uri (cran-uri "checkmate" version))
1656        (sha256
1657         (base32
1658          "1zqcggl9m7slvc0q6zyhssdypb7jzf3l9byl5vxh1qdwjiw2y64g"))))
1659     (build-system r-build-system)
1660     (propagated-inputs
1661      `(("r-backports" ,r-backports)))
1662     (home-page "https://github.com/mllg/checkmate")
1663     (synopsis "Fast and versatile argument checks")
1664     (description
1665      "This package provides tests and assertions to perform frequent argument
1666 checks.  A substantial part of the package was written in C to minimize any
1667 worries about execution time overhead.")
1668     (license license:bsd-3)))
1670 (define-public r-bbmisc
1671   (package
1672     (name "r-bbmisc")
1673     (version "1.10")
1674     (source
1675      (origin
1676        (method url-fetch)
1677        (uri (cran-uri "BBmisc" version))
1678        (sha256
1679         (base32
1680          "0cw2mhw7qhdrx91zzd5iwyh7ch9fy4wxga8j63731q6sxr1airjl"))))
1681     (properties `((upstream-name . "BBmisc")))
1682     (build-system r-build-system)
1683     (propagated-inputs
1684      `(("r-checkmate" ,r-checkmate)))
1685     (home-page "https://github.com/berndbischl/BBmisc")
1686     (synopsis "Miscellaneous functions for R package development")
1687     (description
1688      "This package provides miscellaneous helper functions for the development
1689 of R packages.")
1690     (license license:bsd-3)))
1692 (define-public r-fail
1693   (package
1694     (name "r-fail")
1695     (version "1.3")
1696     (source
1697      (origin
1698        (method url-fetch)
1699        (uri (cran-uri "fail" version))
1700        (sha256
1701         (base32
1702          "0vfm6kmpmgsamda5p0sl771kbnsscan31l2chzssyw93kwmams7d"))))
1703     (build-system r-build-system)
1704     (propagated-inputs
1705      `(("r-bbmisc" ,r-bbmisc)
1706        ("r-checkmate" ,r-checkmate)))
1707     (home-page "https://github.com/mllg/fail")
1708     (synopsis "File abstraction interface layer (FAIL)")
1709     (description
1710      "This package provides a more comfortable interface to work with R data
1711 or source files in a key-value fashion.")
1712     (license license:bsd-3)))
1714 (define-public r-batchjobs
1715   (package
1716     (name "r-batchjobs")
1717     (version "1.6")
1718     (source
1719      (origin
1720        (method url-fetch)
1721        (uri (cran-uri "BatchJobs" version))
1722        (sha256
1723         (base32
1724          "1kb99024jih5bycc226bl4jyvbbl1sg72q3m2wnlshl7s8p6vva0"))))
1725     (properties `((upstream-name . "BatchJobs")))
1726     (build-system r-build-system)
1727     (propagated-inputs
1728      `(("r-bbmisc" ,r-bbmisc)
1729        ("r-brew" ,r-brew)
1730        ("r-checkmate" ,r-checkmate)
1731        ("r-dbi" ,r-dbi)
1732        ("r-digest" ,r-digest)
1733        ("r-fail" ,r-fail)
1734        ("r-rsqlite" ,r-rsqlite)
1735        ("r-sendmailr" ,r-sendmailr)
1736        ("r-stringr" ,r-stringr)))
1737     (home-page "https://github.com/tudo-r/BatchJobs")
1738     (synopsis "Batch computing with R")
1739     (description
1740      "This package provides @code{Map}, @code{Reduce} and @code{Filter}
1741 variants to generate jobs on batch computing systems like PBS/Torque, LSF,
1742 SLURM and Sun Grid Engine.  Multicore and SSH systems are also supported.")
1743     (license license:bsd-2)))
1745 (define-public r-brew
1746   (package
1747     (name "r-brew")
1748     (version "1.0-6")
1749     (source (origin
1750               (method url-fetch)
1751               (uri (cran-uri "brew" version))
1752               (sha256
1753                (base32
1754                 "1vghazbcha8gvkwwcdagjvzx6yl8zm7kgr0i9wxr4jng06d1l3fp"))))
1755     (build-system r-build-system)
1756     (home-page "http://cran.r-project.org/web/packages/brew")
1757     (synopsis "Templating framework for report generation")
1758     (description
1759      "The brew package implements a templating framework for mixing text and R
1760 code for report generation.  The template syntax is similar to PHP, Ruby's erb
1761 module, Java Server Pages, and Python's psp module.")
1762     (license license:gpl2+)))
1764 (define-public r-roxygen2
1765   (package
1766     (name "r-roxygen2")
1767     (version "5.0.1")
1768     (source (origin
1769               (method url-fetch)
1770               (uri (cran-uri "roxygen2" version))
1771               (sha256
1772                (base32
1773                 "19gblyrrn29msbpawcb1hn5m1rshiqwxy0lby0vf92rm13fmsxcz"))))
1774     (build-system r-build-system)
1775     (propagated-inputs
1776      `(("r-brew" ,r-brew)
1777        ("r-digest" ,r-digest)
1778        ("r-rcpp" ,r-rcpp)
1779        ("r-stringi" ,r-stringi)
1780        ("r-stringr" ,r-stringr)))
1781     (home-page "https://github.com/klutometis/roxygen")
1782     (synopsis "In-source documentation system for R")
1783     (description
1784      "Roxygen2 is a Doxygen-like in-source documentation system for Rd,
1785 collation, and NAMESPACE files.")
1786     (license license:gpl2+)))
1788 (define-public r-openssl
1789   (package
1790     (name "r-openssl")
1791     (version "0.9.5")
1792     (source
1793      (origin
1794        (method url-fetch)
1795        (uri (cran-uri "openssl" version))
1796        (sha256
1797         (base32
1798          "1lal8mmcwjhhln10mfi96ipv3d364k0wiviiln220wvhddcpr9pp"))))
1799     (build-system r-build-system)
1800     (inputs
1801      `(("openssl" ,openssl)))
1802     (home-page "https://github.com/jeroenooms/openssl")
1803     (synopsis "Toolkit for encryption, signatures and certificates")
1804     (description
1805      "This package provides R bindings to OpenSSL libssl and libcrypto, plus
1806 custom SSH pubkey parsers.  It supports RSA, DSA and NIST curves P-256, P-384
1807 and P-521.  Cryptographic signatures can either be created and verified
1808 manually or via x509 certificates.  AES block cipher is used in CBC mode for
1809 symmetric encryption; RSA for asymmetric (public key) encryption.  High-level
1810 envelope functions combine RSA and AES for encrypting arbitrary sized data.
1811 Other utilities include key generators, hash functions (md5, sha1, sha256,
1812 etc), base64 encoder, a secure random number generator, and @code{bignum} math
1813 methods for manually performing crypto calculations on large multibyte
1814 integers.")
1815     (license license:expat)))
1817 (define-public r-httr
1818   (package
1819     (name "r-httr")
1820     (version "1.2.1")
1821     (source (origin
1822               (method url-fetch)
1823               (uri (cran-uri "httr" version))
1824               (sha256
1825                (base32
1826                 "03kkjlhyvvi5znwaxfm6cmdsg3q7ivwsvkzgabhjdj2jxs80pfg7"))))
1827     (build-system r-build-system)
1828     (propagated-inputs
1829      `(("r-curl" ,r-curl)
1830        ("r-digest" ,r-digest)
1831        ("r-jsonlite" ,r-jsonlite)
1832        ("r-openssl" ,r-openssl)
1833        ("r-mime" ,r-mime)
1834        ("r-r6" ,r-r6)
1835        ("r-stringr" ,r-stringr)))
1836     (home-page "https://github.com/hadley/httr")
1837     (synopsis "Tools for working with URLs and HTTP")
1838     (description
1839      "The aim of httr is to provide a wrapper for RCurl customised to the
1840 demands of modern web APIs.  It provides useful tools for working with HTTP
1841 organised by HTTP verbs (@code{GET()}, @code{POST()}, etc).  Configuration
1842 functions make it easy to control additional request components.")
1843     (license license:expat)))
1845 (define-public r-git2r
1846   (package
1847     (name "r-git2r")
1848     (version "0.15.0")
1849     (source (origin
1850               (method url-fetch)
1851               (uri (cran-uri "git2r" version))
1852               (sha256
1853                (base32
1854                 "1rpdf85wy9fp456ypvbhl3p9whkb7kgl0n7rkqxd2bhvyzkvjak8"))))
1855     (build-system r-build-system)
1856     ;; This R package contains modified sources of libgit2.  This modified
1857     ;; version of libgit2 is built as the package is built.  Hence libgit2 is
1858     ;; not among the inputs of this package.
1859     (inputs
1860      `(("libssh2" ,libssh2)
1861        ("openssl" ,openssl)
1862        ("zlib" ,zlib)))
1863     (home-page "https://github.com/ropensci/git2r")
1864     (synopsis "Access Git repositories with R")
1865     (description
1866      "This package provides an R interface to the libgit2 library, which is a
1867 pure C implementation of the Git core methods.")
1868     ;; GPLv2 only with linking exception.
1869     (license license:gpl2)))
1871 (define-public r-rstudioapi
1872   (package
1873     (name "r-rstudioapi")
1874     (version "0.6")
1875     (source (origin
1876               (method url-fetch)
1877               (uri (cran-uri "rstudioapi" version))
1878               (sha256
1879                (base32
1880                 "1zkvz72z6nw0xc8bhb21y5x1nk6avijs0w8n4vsbvw9sn76wc96s"))))
1881     (build-system r-build-system)
1882     (home-page "http://cran.r-project.org/web/packages/rstudioapi")
1883     (synopsis "Safely access the RStudio API")
1884     (description
1885      "This package provides functions to access the RStudio API and provide
1886 informative error messages when it's not available.")
1887     (license license:expat)))
1889 (define-public r-devtools
1890   (package
1891     (name "r-devtools")
1892     (version "1.12.0")
1893     (source (origin
1894               (method url-fetch)
1895               (uri (cran-uri "devtools" version))
1896               (sha256
1897                (base32
1898                 "16l18szmj482vf3dvl2fqwwa4zaqylmic1pk7dwh428cp0d86mzi"))))
1899     (build-system r-build-system)
1900     (propagated-inputs
1901      `(("r-curl" ,r-curl)
1902        ("r-digest" ,r-digest)
1903        ("r-evaluate" ,r-evaluate)
1904        ("r-git2r" ,r-git2r)
1905        ("r-httr" ,r-httr)
1906        ("r-jsonlite" ,r-jsonlite)
1907        ("r-memoise" ,r-memoise)
1908        ("r-roxygen2" ,r-roxygen2)
1909        ("r-rstudioapi" ,r-rstudioapi)
1910        ("r-rversions" ,r-rversions)
1911        ("r-whisker" ,r-whisker)
1912        ("r-withr" ,r-withr)))
1913     (home-page "https://github.com/hadley/devtools")
1914     (synopsis "Tools to make developing R packages easier")
1915     (description "The devtools package is a collection of package development
1916 tools to simplify the devolpment of R packages.")
1917     (license license:gpl2+)))
1919 (define-public r-withr
1920   (package
1921     (name "r-withr")
1922     (version "1.0.2")
1923     (source (origin
1924               (method url-fetch)
1925               (uri (cran-uri "withr" version))
1926               (sha256
1927                (base32
1928                 "042z8nmqqilgrvhmbqrjc05qys3gzwq1rqy2wxp2bi5d41859493"))))
1929     (build-system r-build-system)
1930     (home-page "https://github.com/jimhester/withr")
1931     (synopsis "Run code with temporarily modified global state")
1932     (description
1933      "This package provides a set of functions to run R code in an environment
1934 in which global state has been temporarily modified.  Many of these functions
1935 were originally a part of the r-devtools package.")
1936     (license license:gpl2+)))
1938 (define-public r-hms
1939   (package
1940     (name "r-hms")
1941     (version "0.2")
1942     (source
1943      (origin
1944        (method url-fetch)
1945        (uri (cran-uri "hms" version))
1946        (sha256
1947         (base32
1948          "0ln1dc26mkl5pc26vvyf01d35x75q6cjaj39cccxp67chbwbdlds"))))
1949     (build-system r-build-system)
1950     (home-page "https://github.com/rstats-db/hms")
1951     (synopsis "Pretty time of day")
1952     (description
1953      "This package implements an S3 class for storing and formatting
1954 time-of-day values, based on the @code{difftime} class.")
1955     (license license:gpl3+)))
1957 (define-public r-readr
1958   (package
1959     (name "r-readr")
1960     (version "1.0.0")
1961     (source (origin
1962               (method url-fetch)
1963               (uri (cran-uri "readr" version))
1964               (sha256
1965                (base32
1966                 "0xji0dbal6xcxnsmjj678fw29n7wrj45wrd5ng99yhqqijcm9f6g"))))
1967     (build-system r-build-system)
1968     (propagated-inputs
1969      `(("r-curl" ,r-curl)
1970        ("r-rcpp" ,r-rcpp)
1971        ("r-hms" ,r-hms)
1972        ("r-tibble" ,r-tibble)
1973        ("r-r6" ,r-r6)
1974        ("r-bh" ,r-bh)))
1975     (home-page "https://github.com/hadley/readr")
1976     (synopsis "Read tabular data")
1977     (description
1978      "This package provides functions to read flat or tabular text files from
1979 disk (or a connection).")
1980     (license license:gpl2+)))
1982 (define-public r-plotrix
1983   (package
1984     (name "r-plotrix")
1985     (version "3.6-3")
1986     (source (origin
1987               (method url-fetch)
1988               (uri (cran-uri "plotrix" version))
1989               (sha256
1990                (base32
1991                 "0h97jra8zqssi9j4i0psa6c7ya49ya8jd2qc18lc61a4s2yn8w91"))))
1992     (build-system r-build-system)
1993     (home-page "http://cran.r-project.org/web/packages/plotrix")
1994     (synopsis "Various plotting functions")
1995     (description
1996      "This package provides lots of plotting, various labeling, axis and color
1997 scaling functions for R.")
1998     (license license:gpl2+)))
2000 (define-public r-gridbase
2001   (package
2002     (name "r-gridbase")
2003     (version "0.4-7")
2004     (source (origin
2005               (method url-fetch)
2006               (uri (cran-uri "gridBase" version))
2007               (sha256
2008                (base32
2009                 "09jzw4rzwf2y5lcz7b16mb68pn0fqigv34ff7lr6w3yi9k91i1xy"))))
2010     (build-system r-build-system)
2011     (home-page "http://cran.r-project.org/web/packages/gridBase")
2012     (synopsis "Integration of base and grid graphics")
2013     (description
2014      "This package provides an integration of base and grid graphics for R.")
2015     (license license:gpl2+)))
2017 (define-public r-lattice
2018   (package
2019     (name "r-lattice")
2020     (version "0.20-34")
2021     (source (origin
2022               (method url-fetch)
2023               (uri (cran-uri "lattice" version))
2024               (sha256
2025                (base32
2026                 "0615h69czr73k47whhzimf1qxv5qk0cabcrkljwhyrn6m6piq6ja"))))
2027     (build-system r-build-system)
2028     (home-page "http://lattice.r-forge.r-project.org/")
2029     (synopsis "High-level data visualization system")
2030     (description
2031      "The lattice package provides a powerful and elegant high-level data
2032 visualization system inspired by Trellis graphics, with an emphasis on
2033 multivariate data.  Lattice is sufficient for typical graphics needs, and is
2034 also flexible enough to handle most nonstandard requirements.")
2035     (license license:gpl2+)))
2037 (define-public r-latticeextra
2038   (package
2039     (name "r-latticeextra")
2040     (version "0.6-28")
2041     (source
2042      (origin
2043        (method url-fetch)
2044        (uri (cran-uri "latticeExtra" version))
2045        (sha256
2046         (base32
2047          "1hkyqsa7klk5glj9y1hg3rxr5qilqw8h0017zc4c3nps7lr9a1kq"))))
2048     (properties `((upstream-name . "latticeExtra")))
2049     (build-system r-build-system)
2050     (propagated-inputs
2051      `(("r-lattice" ,r-lattice)
2052        ("r-rcolorbrewer" ,r-rcolorbrewer)))
2053     (home-page "http://latticeextra.r-forge.r-project.org/")
2054     (synopsis "Extra graphical utilities based on lattice")
2055     (description
2056      "Building on the infrastructure provided by the lattice package, this
2057 package provides several new high-level graphics functions and methods, as
2058 well as additional utilities such as panel and axis annotation functions.")
2059     (license license:gpl2+)))
2061 (define-public r-rcpparmadillo
2062   (package
2063     (name "r-rcpparmadillo")
2064     (version "0.7.500.0.0")
2065     (source (origin
2066               (method url-fetch)
2067               (uri (cran-uri "RcppArmadillo" version))
2068               (sha256
2069                (base32
2070                 "06qb6877c5qd8lvnc4b27z8fwb5r5pyylkj0g6kj1rn868zkh5ps"))
2071               (modules '((guix build utils)))
2072               ;; Remove bundled armadillo sources
2073               (snippet
2074                '(begin
2075                   (delete-file-recursively "inst/include/armadillo_bits")
2076                   (delete-file "inst/include/armadillo")))))
2077     (properties `((upstream-name . "RcppArmadillo")))
2078     (build-system r-build-system)
2079     (arguments
2080      `(#:phases
2081        (modify-phases %standard-phases
2082          (add-after 'unpack 'link-against-armadillo
2083            (lambda _
2084              (substitute* "src/Makevars"
2085                (("PKG_LIBS=" prefix)
2086                 (string-append prefix "-larmadillo"))))))))
2087     (propagated-inputs
2088      `(("r-rcpp" ,r-rcpp)
2089        ("armadillo" ,armadillo-for-rcpparmadillo)))
2090     (home-page "https://github.com/RcppCore/RcppArmadillo")
2091     (synopsis "Rcpp integration for the Armadillo linear algebra library")
2092     (description
2093      "Armadillo is a templated C++ linear algebra library that aims towards a
2094 good balance between speed and ease of use.  Integer, floating point and
2095 complex numbers are supported, as well as a subset of trigonometric and
2096 statistics functions.  Various matrix decompositions are provided through
2097 optional integration with LAPACK and ATLAS libraries.  This package includes
2098 the header files from the templated Armadillo library.")
2099     ;; Armadillo is licensed under the MPL 2.0, while RcppArmadillo (the Rcpp
2100     ;; bindings to Armadillo) is licensed under the GNU GPL version 2 or
2101     ;; later, as is the rest of 'Rcpp'.
2102     (license license:gpl2+)))
2104 (define-public r-bitops
2105   (package
2106     (name "r-bitops")
2107     (version "1.0-6")
2108     (source (origin
2109               (method url-fetch)
2110               (uri (cran-uri "bitops" version))
2111               (sha256
2112                (base32
2113                 "176nr5wpnkavn5z0yy9f7d47l37ndnn2w3gv854xav8nnybi6wwv"))))
2114     (build-system r-build-system)
2115     (home-page "http://cran.r-project.org/web/packages/bitops")
2116     (synopsis "Bitwise operations")
2117     (description
2118      "This package provides functions for bitwise operations on integer
2119 vectors.")
2120     (license license:gpl2+)))
2122 (define-public r-catools
2123   (package
2124     (name "r-catools")
2125     (version "1.17.1")
2126     (source (origin
2127               (method url-fetch)
2128               (uri (cran-uri "caTools" version))
2129               (sha256
2130                (base32
2131                 "1x4szsn2qmbzpyjfdaiz2q7jwhap2gky9wq0riah74q0pzz76ank"))))
2132     (properties `((upstream-name . "caTools")))
2133     (build-system r-build-system)
2134     (propagated-inputs
2135      `(("r-bitops" ,r-bitops)))
2136     (home-page "http://cran.r-project.org/web/packages/caTools")
2137     (synopsis "Various tools including functions for moving window statistics")
2138     (description
2139      "This package contains several basic utility functions including:
2140 moving (rolling, running) window statistic functions, read/write for GIF and
2141 ENVI binary files, fast calculation of AUC, LogitBoost classifier, base64
2142 encoder/decoder, round-off-error-free sum and cumsum, etc.")
2143     (license license:gpl3+)))
2145 (define-public r-rmarkdown
2146   (package
2147     (name "r-rmarkdown")
2148     (version "1.1")
2149     (source
2150       (origin
2151         (method url-fetch)
2152         (uri (cran-uri "rmarkdown" version))
2153         (sha256
2154           (base32
2155             "1czvkaz1ji3jyj6qrvbswisqs9d05ljqc4vjkfdrf6hygix7azd0"))))
2156     (properties `((upstream-name . "rmarkdown")))
2157     (build-system r-build-system)
2158     (propagated-inputs
2159      `(("r-catools" ,r-catools)
2160        ("r-evaluate" ,r-evaluate)
2161        ("r-tibble" ,r-tibble)
2162        ("r-htmltools" ,r-htmltools)
2163        ("r-jsonlite" ,r-jsonlite)
2164        ("r-base64enc" ,r-base64enc)
2165        ("r-knitr" ,r-knitr)
2166        ("r-yaml" ,r-yaml)
2167        ("ghc-pandoc" ,ghc-pandoc)))
2168     (home-page "http://rmarkdown.rstudio.com")
2169     (synopsis "Convert R Markdown documents into a variety of formats")
2170     (description
2171      "This package provides tools to convert R Markdown documents into a
2172 variety of formats.")
2173     (license license:gpl3+)))
2175 (define-public r-gtable
2176   (package
2177     (name "r-gtable")
2178     (version "0.2.0")
2179     (source (origin
2180               (method url-fetch)
2181               (uri (cran-uri "gtable" version))
2182               (sha256
2183                (base32
2184                 "0vz7073m0a2q12qzzihrfh5c2kx5jqi5l7z470fxmwqghdllh7l0"))))
2185     (properties `((upstream-name . "gtable")))
2186     (build-system r-build-system)
2187     (home-page "http://cran.r-project.org/web/packages/gtable")
2188     (synopsis "Arrange grobs in tables")
2189     (description
2190      "This package provides tools to make it easier to work with tables of
2191 grobs.")
2192     (license license:gpl2+)))
2194 (define-public r-gridextra
2195   (package
2196     (name "r-gridextra")
2197     (version "2.2.1")
2198     (source (origin
2199               (method url-fetch)
2200               (uri (cran-uri "gridExtra" version))
2201               (sha256
2202                (base32
2203                 "0638ihwl00j76ivaxxhxvi8z573lwy1jym3srr78mx6dbdd4bzj4"))))
2204     (properties `((upstream-name . "gridExtra")))
2205     (build-system r-build-system)
2206     (propagated-inputs
2207      `(("r-gtable" ,r-gtable)))
2208     (native-inputs
2209      `(("r-knitr" ,r-knitr))) ;for building vignettes
2210     (home-page "https://github.com/baptiste/gridextra")
2211     (synopsis "Miscellaneous functions for \"Grid\" graphics")
2212     (description
2213      "This package provides a number of user-level functions to work with
2214 @code{grid} graphics, notably to arrange multiple grid-based plots on a page,
2215 and draw tables.")
2216     (license license:gpl2+)))
2218 (define-public r-rsqlite
2219   (package
2220     (name "r-rsqlite")
2221     (version "1.0.0")
2222     (source (origin
2223               (method url-fetch)
2224               (uri (cran-uri "RSQLite" version))
2225               (sha256
2226                (base32
2227                 "08b1syv8z887gxiw8i09dpqh0zisfb6ihq6qqr01zipvkahzq34f"))))
2228     (properties `((upstream-name . "RSQLite")))
2229     (build-system r-build-system)
2230     (propagated-inputs
2231      `(("r-dbi" ,r-dbi)))
2232     (home-page "https://github.com/rstats-db/RSQLite")
2233     (synopsis "SQLite interface for R")
2234     (description
2235      "This package embeds the SQLite database engine in R and provides an
2236 interface compliant with the DBI package.  The source for the SQLite
2237 engine (version 3.8.6) is included.")
2238     (license license:lgpl2.0+)))
2240 (define-public r-rcurl
2241   (package
2242     (name "r-rcurl")
2243     (version "1.95-0.1.2")
2244     (source (origin
2245               (method url-fetch)
2246               (uri (string-append "http://www.bioconductor.org/packages/"
2247                                   "release/extra/src/"
2248                                   "contrib/RCurl_" version ".tar.gz"))
2249               (sha256
2250                (base32
2251                 "0l7qi45jxlf898n0jazabnam1yyczvqfdknd00bdirhhiplpd1sc"))))
2252     (properties `((upstream-name . "RCurl")))
2253     (build-system r-build-system)
2254     (inputs
2255      `(("libcurl" ,curl)))
2256     (propagated-inputs
2257      `(("r-bitops" ,r-bitops)))
2258     (home-page "http://www.omegahat.org/RCurl")
2259     (synopsis "General network client interface for R")
2260     (description
2261      "The package allows one to compose general HTTP requests and provides
2262 convenient functions to fetch URIs, GET and POST forms, etc. and process the
2263 results returned by the Web server.  This provides a great deal of control
2264 over the HTTP/FTP/... connection and the form of the request while providing a
2265 higher-level interface than is available just using R socket connections.
2266 Additionally, the underlying implementation is robust and extensive,
2267 supporting FTP/FTPS/TFTP (uploads and downloads), SSL/HTTPS, telnet, dict,
2268 ldap, and also supports cookies, redirects, authentication, etc.")
2269     (license license:bsd-3)))
2271 (define-public r-xml
2272   (package
2273     (name "r-xml")
2274     (version "3.98-1.4")
2275     (source (origin
2276               (method url-fetch)
2277               (uri (cran-uri "XML" version))
2278               (sha256
2279                (base32
2280                 "09hiy5a875v2fhsgrsfymrwccn9249wnnsr6ck2slrig65svq2lw"))))
2281     (properties
2282      `((upstream-name . "XML")))
2283     (build-system r-build-system)
2284     (inputs
2285      `(("libxml2" ,libxml2)))
2286     (propagated-inputs
2287      `(("r-rcurl" ,r-rcurl)))
2288     (home-page "http://www.omegahat.org/RSXML")
2289     (synopsis "Tools for parsing and generating XML within R")
2290     (description
2291      "Many approaches for both reading and creating XML (and HTML)
2292 documents (including DTDs), both local and accessible via HTTP or FTP.  Also
2293 offers access to an XPath \"interpreter\".")
2294     (license license:bsd-2)))
2296 (define-public r-xnomial
2297   (package
2298     (name "r-xnomial")
2299     (version "1.0.4")
2300     (source
2301      (origin (method url-fetch)
2302              (uri (cran-uri "XNomial" version))
2303              (sha256
2304               (base32
2305                "1mwx302576rmsjllbq2clfxilm3hkyp5bw0wmwqbn0kgv5wpy8z6"))))
2306     (properties (quasiquote ((upstream-name . "XNomial"))))
2307     (build-system r-build-system)
2308     (home-page "http://cran.r-project.org/web/packages/XNomial")
2309     (synopsis "Goodness-of-Fit test for multinomial data")
2310     (description
2311      "This package provides an exact Goodness-of-Fit test for
2312 multinomial data with fixed probabilities.  It can be used to
2313 determine whether a set of counts fits a given expected ratio.  To see
2314 whether a set of observed counts fits an expectation, one can examine
2315 all possible outcomes with @code{xmulti()} or a random sample of them
2316 with @code{xmonte()} and find the probability of an observation
2317 deviating from the expectation by at least as much as the observed.
2318 As a measure of deviation from the expected, one can use the
2319 log-likelihood ratio, the multinomial probability, or the classic
2320 chi-square statistic.  A histogram of the test statistic can also be
2321 plotted and compared with the asymptotic curve.")
2322     (license (list license:gpl2+ license:gpl3+))))
2324 (define-public r-lambda-r
2325   (package
2326     (name "r-lambda-r")
2327     (version "1.1.9")
2328     (source (origin
2329               (method url-fetch)
2330               (uri (cran-uri "lambda.r" version))
2331               (sha256
2332                (base32
2333                 "1j6287iqvs3ill6r5g6ksf5809qp0l0nf20ib8266m1r09lc9j14"))))
2334     (properties `((upstream-name . "lambda.r")))
2335     (build-system r-build-system)
2336     (home-page "http://cran.r-project.org/web/packages/lambda.r")
2337     (synopsis "Functional programming extension for R")
2338     (description
2339      "This package provides a language extension to efficiently write
2340 functional programs in R.  Syntax extensions include multi-part function
2341 definitions, pattern matching, guard statements, built-in (optional) type
2342 safety.")
2343     (license license:lgpl3+)))
2345 (define-public r-futile-options
2346   (package
2347     (name "r-futile-options")
2348     (version "1.0.0")
2349     (source (origin
2350               (method url-fetch)
2351               (uri (cran-uri "futile.options" version))
2352               (sha256
2353                (base32
2354                 "1hp82h6xqq5cck67h7lpf22n3j7mg3v1mla5y5ivnzrrb7iyr17f"))))
2355     (properties
2356      `((upstream-name . "futile.options")))
2357     (build-system r-build-system)
2358     (home-page "http://cran.r-project.org/web/packages/futile.options")
2359     (synopsis "Options management framework")
2360     (description
2361      "The futile.options subsystem provides an easy user-defined options
2362 management system that is properly scoped.  This means that options created
2363 via @code{futile.options} are fully self-contained and will not collide with
2364 options defined in other packages.")
2365     (license license:lgpl3+)))
2367 (define-public r-futile-logger
2368   (package
2369     (name "r-futile-logger")
2370     (version "1.4.3")
2371     (source (origin
2372               (method url-fetch)
2373               (uri (cran-uri "futile.logger" version))
2374               (sha256
2375                (base32
2376                 "1r3nayk0z9n1svbf8640vw90dal5q07nkn0gv4bnva3pbzb352sy"))))
2377     (properties `((upstream-name . "futile.logger")))
2378     (build-system r-build-system)
2379     (propagated-inputs
2380      `(("r-futile-options" ,r-futile-options)
2381        ("r-lambda-r" ,r-lambda-r)))
2382     (home-page "http://cran.r-project.org/web/packages/futile.logger")
2383     (synopsis "Logging utility for R")
2384     (description
2385      "This package provides a simple yet powerful logging utility.  Based
2386 loosely on log4j, futile.logger takes advantage of R idioms to make logging a
2387 convenient and easy to use replacement for @code{cat} and @code{print}
2388 statements.")
2389     (license license:lgpl3+)))
2391 (define-public r-segmented
2392   (package
2393     (name "r-segmented")
2394     (version "0.5-1.4")
2395     (source
2396      (origin
2397        (method url-fetch)
2398        (uri (cran-uri "segmented" version))
2399        (sha256
2400         (base32
2401          "1740cvx2q4v23g4q0zkvg50s5bv8jcrlzzhm7fac4xn0riwmzp5i"))))
2402     (build-system r-build-system)
2403     (home-page "http://cran.r-project.org/web/packages/segmented")
2404     (synopsis "Regression models with breakpoints estimation")
2405     (description
2406      "Given a regression model, segmented updates the model by adding one or
2407 more segmented (i.e., piecewise-linear) relationships.  Several variables with
2408 multiple breakpoints are allowed.")
2409     (license (list license:gpl2+ license:gpl3+))))
2411 (define-public r-snow
2412   (package
2413     (name "r-snow")
2414     (version "0.4-2")
2415     (source (origin
2416               (method url-fetch)
2417               (uri (cran-uri "snow" version))
2418               (sha256
2419                (base32
2420                 "1mxbrkpnmq32x4wd0194d541661yvfrrjlr3lsf7qq53ms3h21zf"))))
2421     (build-system r-build-system)
2422     (home-page "http://cran.r-project.org/web/packages/snow")
2423     (synopsis "Support for simple parallel computing in R")
2424     (description
2425      "The snow package provides support for simple parallel computing on a
2426 network of workstations using R.  A master R process calls @code{makeCluster}
2427 to start a cluster of worker processes; the master process then uses functions
2428 such as @code{clusterCall} and @code{clusterApply} to execute R code on the
2429 worker processes and collect and return the results on the master.")
2430     (license (list license:gpl2+ license:gpl3+))))
2432 (define-public r-sparsem
2433   (package
2434     (name "r-sparsem")
2435     (version "1.72")
2436     (source (origin
2437               (method url-fetch)
2438               (uri (cran-uri "SparseM" version))
2439               (sha256
2440                (base32
2441                 "0zpb1swn9xjkb22sky10ixff7vqfiz9m36nkbc1qqbm9frcldnka"))))
2442     (properties
2443      `((upstream-name . "SparseM")))
2444     (inputs
2445      `(("gfortran" ,gfortran)))
2446     (build-system r-build-system)
2447     (home-page "http://www.econ.uiuc.edu/~roger/research/sparse/sparse.html")
2448     (synopsis "Sparse linear algebra")
2449     (description
2450      "This package provides some basic linear algebra functionality for sparse
2451 matrices.  It includes Cholesky decomposition and backsolving as well as
2452 standard R subsetting and Kronecker products.")
2453     (license license:gpl2+)))
2455 (define-public r-iterators
2456   (package
2457     (name "r-iterators")
2458     (version "1.0.8")
2459     (source
2460      (origin
2461        (method url-fetch)
2462        (uri (cran-uri "iterators" version))
2463        (sha256
2464         (base32
2465          "1f057pabs7ss9h1n244can26qsi5n2k3salrdk0b0vkphlrs4kmf"))))
2466     (build-system r-build-system)
2467     (home-page "http://cran.r-project.org/web/packages/iterators")
2468     (synopsis "Iterator construct for R")
2469     (description
2470      "This package provides support for iterators, which allow a programmer to
2471 traverse through all the elements of a vector, list, or other collection of
2472 data.")
2473     (license license:asl2.0)))
2475 (define-public r-codetools
2476   (package
2477     (name "r-codetools")
2478     (version "0.2-15")
2479     (source
2480      (origin
2481        (method url-fetch)
2482        (uri (cran-uri "codetools" version))
2483        (sha256
2484         (base32
2485          "0h7sjmvvsi35041jp47cxhsqzgf1y8jrw6fxii7n26i8g7nrh1sf"))))
2486     (build-system r-build-system)
2487     (home-page "http://cran.r-project.org/web/packages/codetools")
2488     (synopsis "Code analysis tools for R")
2489     (description "This package provides code analysis tools for R to check R
2490 code for possible problems.")
2491     (license (list license:gpl2+ license:gpl3+))))
2493 (define-public r-foreach
2494   (package
2495     (name "r-foreach")
2496     (version "1.4.3")
2497     (source
2498      (origin
2499        (method url-fetch)
2500        (uri (cran-uri "foreach" version))
2501        (sha256
2502         (base32
2503          "10aqsd3rxz03s1qdb6gsb1cj89mj4vmh491zfpin4skj1xvkzw0y"))))
2504     (build-system r-build-system)
2505     (propagated-inputs
2506      `(("r-codetools" ,r-codetools)
2507        ("r-iterators" ,r-iterators)))
2508     (home-page "http://cran.r-project.org/web/packages/foreach")
2509     (synopsis "Foreach looping construct for R")
2510     (description
2511      "This package provides support for the @code{foreach} looping construct.
2512 @code{foreach} is an idiom that allows for iterating over elements in a
2513 collection, without the use of an explicit loop counter.  This package in
2514 particular is intended to be used for its return value, rather than for its
2515 side effects.  In that sense, it is similar to the standard @code{lapply}
2516 function, but doesn't require the evaluation of a function.  Using
2517 @code{foreach} without side effects also facilitates executing the loop in
2518 parallel.")
2519     (license license:asl2.0)))
2521 (define-public r-doparallel
2522   (package
2523     (name "r-doparallel")
2524     (version "1.0.10")
2525     (source
2526      (origin
2527        (method url-fetch)
2528        (uri (cran-uri "doParallel" version))
2529        (sha256
2530         (base32
2531          "1mddx25l25pw9d0csnx2q203dbg5hbrhkr1f08kw0p02a1lln0kh"))))
2532     (properties `((upstream-name . "doParallel")))
2533     (build-system r-build-system)
2534     (propagated-inputs
2535      `(("r-foreach" ,r-foreach)
2536        ("r-iterators" ,r-iterators)))
2537     (home-page "http://cran.r-project.org/web/packages/doParallel")
2538     (synopsis "Foreach parallel adaptor for the 'parallel' package")
2539     (description
2540      "This package provides a parallel backend for the @code{%dopar%} function
2541 using the parallel package.")
2542     (license license:gpl2+)))
2544 (define-public r-domc
2545   (package
2546     (name "r-domc")
2547     (version "1.3.4")
2548     (source
2549      (origin
2550        (method url-fetch)
2551        (uri (cran-uri "doMC" version))
2552        (sha256
2553         (base32
2554          "0y47jl6g4f83r14pj8bafdzq1phj7bxy5dwyz3k43d2rr8phk8bn"))))
2555     (properties `((upstream-name . "doMC")))
2556     (build-system r-build-system)
2557     (propagated-inputs
2558      `(("r-foreach" ,r-foreach)
2559        ("r-iterators" ,r-iterators)))
2560     (home-page "http://cran.r-project.org/web/packages/doMC")
2561     (synopsis "Foreach parallel adaptor for the 'parallel' package")
2562     (description
2563      "This package provides a parallel backend for the @code{%dopar%} function
2564 using the multicore functionality of the parallel package.")
2565     (license license:gpl2+)))
2567 (define-public r-dt
2568   (package
2569     (name "r-dt")
2570     (version "0.2")
2571     (source (origin
2572               (method url-fetch)
2573               (uri (cran-uri "DT" version))
2574               (sha256
2575                (base32
2576                 "1g86p0jcjqi2ph5rhm45jkzibsa6yfcj8n5cg3giy90sqgjzkdx1"))))
2577     (properties
2578      `((upstream-name . "DT")))
2579     (build-system r-build-system)
2580     (propagated-inputs
2581      `(("r-htmltools" ,r-htmltools)
2582        ("r-htmlwidgets" ,r-htmlwidgets)
2583        ("r-magrittr" ,r-magrittr)))
2584     (home-page "http://rstudio.github.io/DT")
2585     (synopsis "R wrapper of the DataTables JavaScript library")
2586     (description
2587      "This package allows for data objects in R to be rendered as HTML tables
2588 using the JavaScript library 'DataTables' (typically via R Markdown or Shiny).
2589 The 'DataTables' library has been included in this R package.")
2590     ;; The DT package as a whole is distributed under GPLv3.  The DT package
2591     ;; inludes other software components under different licenses:
2592     ;;
2593     ;;   * Expat: jQuery, jquery.highlight.js, DataTables
2594     ;;   * ASL2.0: selectize.js
2595     ;;   * WTFPL: noUiSlider
2596     (license (list license:gpl3
2597                    license:expat
2598                    license:asl2.0
2599                    (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
2601 (define-public r-base64enc
2602   (package
2603     (name "r-base64enc")
2604     (version "0.1-3")
2605     (source (origin
2606               (method url-fetch)
2607               (uri (cran-uri "base64enc" version))
2608               (sha256
2609                (base32
2610                 "13b89fhg1nx7zds82a0biz847ixphg9byf5zl2cw9kab6s56v1bd"))))
2611     (build-system r-build-system)
2612     (home-page "http://www.rforge.net/base64enc")
2613     (synopsis "Tools for Base64 encoding")
2614     (description
2615      "This package provides tools for handling Base64 encoding.  It is more
2616 flexible than the orphaned \"base64\" package.")
2617     (license license:gpl2+)))
2619 (define-public r-irlba
2620   (package
2621     (name "r-irlba")
2622     (version "2.1.2")
2623     (source
2624      (origin
2625        (method url-fetch)
2626        (uri (cran-uri "irlba" version))
2627        (sha256
2628         (base32
2629          "1qbcn0ix85pmk296jhpi419kvh06vxm5cq24yk013ps3g7fyi0si"))))
2630     (build-system r-build-system)
2631     (home-page "http://cran.r-project.org/web/packages/irlba")
2632     (synopsis "Methods for eigendecomposition of large matrices")
2633     (description
2634      "This package provides fast and memory efficient methods for truncated
2635 singular and eigenvalue decompositions, as well as for principal component
2636 analysis of large sparse or dense matrices.")
2637     (license (list license:gpl2+ license:gpl3+))))
2639 (define-public r-glmnet
2640   (package
2641    (name "r-glmnet")
2642    (version "2.0-5")
2643    (source
2644     (origin
2645      (method url-fetch)
2646      (uri (cran-uri "glmnet" version))
2647      (sha256
2648       (base32
2649        "1cbpzmbv837fvq88rgn6mgzgr9f1wqp9fg8gh2kkmngvr1957a9c"))))
2650    (build-system r-build-system)
2651     (inputs
2652      `(("gfortran" ,gfortran)))
2653    (propagated-inputs
2654     `(("r-foreach" ,r-foreach)))
2655    (home-page "http://www.jstatsoft.org/v33/i01")
2656    (synopsis "Lasso and elastic-net regularized generalized linear models")
2657    (description
2658     "The glmnet package provides efficient procedures for fitting the entire
2659 lasso or elastic-net regularization path for linear and Poisson regression, as
2660 well as logistic, multinomial, Cox, multiple-response Gaussian and grouped
2661 multinomial models.  The algorithm uses cyclical coordinate descent in a
2662 path-wise fashion.")
2663    (license license:gpl2+)))
2665 (define-public r-pkgmaker
2666   (package
2667     (name "r-pkgmaker")
2668     (version "0.22")
2669     (source
2670      (origin
2671        (method url-fetch)
2672        (uri (cran-uri "pkgmaker" version))
2673        (sha256
2674         (base32
2675          "0vrqnd3kg6liqvpbd969jjsdx0f0rvmmxgdbwwrp6xfmdg0pib8r"))))
2676     (build-system r-build-system)
2677     (propagated-inputs
2678      `(("r-codetools" ,r-codetools)
2679        ("r-digest" ,r-digest)
2680        ("r-registry" ,r-registry)
2681        ("r-stringr" ,r-stringr)
2682        ("r-xtable" ,r-xtable)))
2683     (home-page "https://renozao.github.io/pkgmaker")
2684     (synopsis "Package development utilities")
2685     (description
2686      "This package provides some low-level utilities to use for R package
2687 development.  It currently provides managers for multiple package specific
2688 options and registries, vignette, unit test and bibtex related utilities.")
2689     (license license:gpl2+)))
2691  (define-public r-registry
2692    (package
2693      (name "r-registry")
2694      (version "0.3")
2695      (source
2696       (origin
2697         (method url-fetch)
2698         (uri (cran-uri "registry" version))
2699         (sha256
2700          (base32
2701           "0c7lscfxncwwd8zp46h2xfw9gw14dypqv6m2kx85xjhjh0xw99aq"))))
2702      (build-system r-build-system)
2703      (home-page "http://cran.r-project.org/web/packages/registry")
2704      (synopsis "Infrastructure for R package registries")
2705      (description
2706       "This package provides a generic infrastructure for creating and using R
2707 package registries.")
2708      (license license:gpl2+)))
2710 (define-public r-rngtools
2711   (package
2712     (name "r-rngtools")
2713     (version "1.2.4")
2714     (source
2715      (origin
2716        (method url-fetch)
2717        (uri (cran-uri "rngtools" version))
2718        (sha256
2719         (base32
2720          "1fcgfqrrb48z37xgy8sffx91p9irp39yqzxv7nqp1x2hnwsrh097"))))
2721     (build-system r-build-system)
2722     (propagated-inputs
2723      `(("r-digest" ,r-digest)
2724        ("r-pkgmaker" ,r-pkgmaker)
2725        ("r-stringr" ,r-stringr)))
2726     (home-page "https://renozao.github.io/rngtools")
2727     (synopsis "Utility functions for working with random number generators")
2728     (description
2729      "This package contains a set of functions for working with Random Number
2730 Generators (RNGs).  In particular, it defines a generic S4 framework for
2731 getting/setting the current RNG, or RNG data that are embedded into objects
2732 for reproducibility.  Notably, convenient default methods greatly facilitate
2733 the way current RNG settings can be changed.")
2734     (license license:gpl3+)))
2736 (define-public r-rtsne
2737   (package
2738     (name "r-rtsne")
2739     (version "0.11")
2740     (source
2741      (origin
2742        (method url-fetch)
2743        (uri (cran-uri "Rtsne" version))
2744        (sha256
2745         (base32
2746          "0zi4nxgpiv1gpdmcnqdhz5kymzp8m5xj02zpf290p1yyydl76bhy"))))
2747     (properties `((upstream-name . "Rtsne")))
2748     (build-system r-build-system)
2749     (propagated-inputs
2750      `(("r-rcpp" ,r-rcpp)))
2751     (home-page "https://github.com/jkrijthe/Rtsne")
2752     (synopsis "T-distributed stochastic neighbor embedding")
2753     (description
2754      "This package provides an R wrapper around the fast T-distributed
2755 Stochastic Neighbor Embedding using a Barnes-Hut implementation.")
2756     ;; The declared license for this package is BSD-3, but it also includes
2757     ;; code licensed under BSD-4.
2758     (license (list license:bsd-3 license:bsd-4))))
2760 (define-public r-e1071
2761   (package
2762     (name "r-e1071")
2763     (version "1.6-7")
2764     (source
2765      (origin
2766        (method url-fetch)
2767        (uri (cran-uri "e1071" version))
2768        (sha256
2769         (base32
2770          "1069qwj9gsjq6par2cgfah8nn5x2w38830761x1f7mqpmk0gnj3h"))))
2771     (build-system r-build-system)
2772     (home-page "http://cran.r-project.org/web/packages/e1071")
2773     (synopsis "Miscellaneous functions for probability theory")
2774     (description
2775      "This package provides functions for latent class analysis, short time
2776 Fourier transform, fuzzy clustering, support vector machines, shortest path
2777 computation, bagged clustering, naive Bayes classifier, and more.")
2778     (license license:gpl2+)))
2780 (define-public r-bigmemory-sri
2781   (package
2782     (name "r-bigmemory-sri")
2783     (version "0.1.3")
2784     (source
2785      (origin
2786        (method url-fetch)
2787        (uri (cran-uri "bigmemory.sri" version))
2788        (sha256
2789         (base32 "0mg14ilwdkd64q2ri9jdwnk7mp55dqim7xfifrs65sdsv1934h2m"))))
2790     (properties
2791      `((upstream-name . "bigmemory.sri")))
2792     (build-system r-build-system)
2793     (home-page "http://cran.r-project.org/web/packages/bigmemory.sri")
2794     (synopsis "Shared resource interface for the bigmemory package")
2795     (description "This package provides a shared resource interface for the
2796 bigmemory and synchronicity packages.")
2797     ;; Users can choose either LGPLv3 or ASL2.0.
2798     (license (list license:lgpl3 license:asl2.0))))
2800 (define-public r-synchronicity
2801   (package
2802     (name "r-synchronicity")
2803     (version "1.1.9.1")
2804     (source
2805      (origin
2806        (method url-fetch)
2807        (uri (cran-uri "synchronicity" version))
2808        (sha256
2809         (base32
2810          "0d9skpwmsnkn4xb3f2kgyyv8bhdi0r9p1kj3cvi0s92fjjnpi00c"))))
2811     (build-system r-build-system)
2812     (propagated-inputs
2813      `(("r-bh" ,r-bh)
2814        ("r-bigmemory-sri" ,r-bigmemory-sri)
2815        ("r-rcpp" ,r-rcpp)))
2816     (home-page "http://www.bigmemory.org")
2817     (synopsis "Boost mutex functionality in R")
2818     (description "This package provides support for synchronization
2819 via mutexes and may eventually support interprocess communication and
2820 message passing.")
2821     ;; Users can choose either LGPLv3 or ASL2.0.
2822     (license (list license:lgpl3 license:asl2.0))))
2824 (define-public r-bigmemory
2825   (package
2826     (name "r-bigmemory")
2827     (version "4.5.19")
2828     (source
2829      (origin
2830        (method url-fetch)
2831        (uri (cran-uri "bigmemory" version))
2832        (sha256
2833         (base32
2834          "191gbzca557kpk7mdsg716vfyqpr7j5din6qb8hin4g1nkzzwmg6"))))
2835     (build-system r-build-system)
2836     (propagated-inputs
2837      `(("r-bh" ,r-bh)
2838        ("r-rcpp" ,r-rcpp)
2839        ("r-bigmemory-sri" ,r-bigmemory-sri)
2840        ("r-r-utils" ,r-r-utils)))
2841     (home-page "http://www.bigmemory.org")
2842     (synopsis "Manage large matrices with shared memory or memory-mapped files")
2843     (description "This package provides methods to create, store, access, and
2844 manipulate large matrices.  Matrices are allocated to shared memory and may use
2845 memory-mapped files.")
2846     ;; Users can choose either LGPLv3 or ASL2.0.
2847     (license (list license:lgpl3 license:asl2.0))))
2849 (define-public r-nmf
2850   (package
2851     (name "r-nmf")
2852     (version "0.20.6")
2853     (source
2854      (origin
2855        (method url-fetch)
2856        (uri (cran-uri "NMF" version))
2857        (sha256
2858         (base32
2859          "0mmh9bz0zjwd8h9jplz4rq3g94npaqj8s4px51vcv47csssd9k6z"))))
2860     (properties `((upstream-name . "NMF")))
2861     (build-system r-build-system)
2862     (propagated-inputs
2863      `(("r-cluster" ,r-cluster)
2864        ("r-bigmemory" ,r-bigmemory)
2865        ("r-synchronicity" ,r-synchronicity)
2866        ("r-colorspace" ,r-colorspace)
2867        ("r-digest" ,r-digest)
2868        ("r-doparallel" ,r-doparallel)
2869        ("r-foreach" ,r-foreach)
2870        ("r-ggplot2" ,r-ggplot2)
2871        ("r-gridbase" ,r-gridbase)
2872        ("r-pkgmaker" ,r-pkgmaker)
2873        ("r-rcolorbrewer" ,r-rcolorbrewer)
2874        ("r-registry" ,r-registry)
2875        ("r-reshape2" ,r-reshape2)
2876        ("r-rngtools" ,r-rngtools)
2877        ("r-stringr" ,r-stringr)))
2878     (home-page "http://renozao.github.io/NMF")
2879     (synopsis "Algorithms and framework for nonnegative matrix factorization")
2880     (description
2881      "This package provides a framework to perform Non-negative Matrix
2882 Factorization (NMF).  The package implements a set of already published
2883 algorithms and seeding methods, and provides a framework to test, develop and
2884 plug new or custom algorithms.  Most of the built-in algorithms have been
2885 optimized in C++, and the main interface function provides an easy way of
2886 performing parallel computations on multicore machines.")
2887     (license license:gpl2+)))
2889 (define-public r-igraph
2890   (package
2891     (name "r-igraph")
2892     (version "1.0.1")
2893     (source
2894      (origin
2895        (method url-fetch)
2896        (uri (cran-uri "igraph" version))
2897        (sha256
2898         (base32
2899          "00jnm8v3kvxpxav5klld2z2nnkcpj4sdwv4ksipddy5mp04ysr6w"))))
2900     (build-system r-build-system)
2901     (native-inputs
2902      `(("gfortran" ,gfortran)))
2903     (inputs
2904      `(("gmp" ,gmp)
2905        ("libxml2" ,libxml2)))
2906     (propagated-inputs
2907      `(("r-irlba" ,r-irlba)
2908        ("r-magrittr" ,r-magrittr)
2909        ("r-nmf" ,r-nmf)))
2910     (home-page "http://igraph.org")
2911     (synopsis "Network analysis and visualization")
2912     (description
2913      "This package provides routines for simple graphs and network analysis.
2914 It can handle large graphs very well and provides functions for generating
2915 random and regular graphs, graph visualization, centrality methods and much
2916 more.")
2917     (license license:gpl2+)))
2919 (define-public r-r-methodss3
2920   (package
2921     (name "r-r-methodss3")
2922     (version "1.7.1")
2923     (source (origin
2924               (method url-fetch)
2925               (uri (cran-uri "R.methodsS3" version))
2926               (sha256
2927                (base32
2928                 "11z6v2i7jl647wxi9p5z66yvfnnqv6s7fxqmz7w2gkb6j8wl1f24"))))
2929     (properties `((upstream-name . "R.methodsS3")))
2930     (build-system r-build-system)
2931     (home-page "http://cran.r-project.org/web/packages/R.methodsS3")
2932     (synopsis "S3 methods simplified")
2933     (description
2934      "This package provides methods that simplify the setup of S3 generic
2935 functions and S3 methods.  Major effort has been made in making definition of
2936 methods as simple as possible with a minimum of maintenance for package
2937 developers.  For example, generic functions are created automatically, if
2938 missing, and naming conflict are automatically solved, if possible.  The
2939 method @code{setMethodS3()} is a good start for those who in the future may
2940 want to migrate to S4.")
2941     (license license:lgpl2.1+)))
2943 (define-public r-r-oo
2944   (package
2945     (name "r-r-oo")
2946     (version "1.21.0")
2947     (source (origin
2948               (method url-fetch)
2949               (uri (cran-uri "R.oo" version))
2950               (sha256
2951                (base32
2952                 "0723gxjazgqq7v3lwnl7axw3brzcnizvhbd71ijkkv8mz31fwp34"))))
2953     (properties `((upstream-name . "R.oo")))
2954     (build-system r-build-system)
2955     (propagated-inputs
2956      `(("r-r-methodss3" ,r-r-methodss3)))
2957     (home-page "https://github.com/HenrikBengtsson/R.oo")
2958     (synopsis "R object-oriented programming with or without references")
2959     (description
2960      "This package provides methods and classes for object-oriented
2961 programming in R with or without references.  Large effort has been made on
2962 making definition of methods as simple as possible with a minimum of
2963 maintenance for package developers.")
2964     (license license:lgpl2.1+)))
2966 (define-public r-r-utils
2967   (package
2968     (name "r-r-utils")
2969     (version "2.4.0")
2970     (source (origin
2971               (method url-fetch)
2972               (uri (cran-uri "R.utils" version))
2973               (sha256
2974                (base32
2975                 "0cn0wlmgwclmqak05825wrk9q894xa4qjqa7rn0i9p4ss7k6vifj"))))
2976     (properties `((upstream-name . "R.utils")))
2977     (build-system r-build-system)
2978     (propagated-inputs
2979      `(("r-r-methodss3" ,r-r-methodss3)
2980        ("r-r-oo" ,r-r-oo)))
2981     (home-page "https://github.com/HenrikBengtsson/R.utils")
2982     (synopsis "Various programming utilities")
2983     (description
2984      "This package provides utility functions useful when programming and
2985 developing R packages.")
2986     (license license:lgpl2.1+)))
2988 (define-public r-r-cache
2989   (package
2990     (name "r-r-cache")
2991     (version "0.12.0")
2992     (source (origin
2993               (method url-fetch)
2994               (uri (cran-uri "R.cache" version))
2995               (sha256
2996                (base32
2997                 "006x52w9r8phw5hgqmyp0bz8z42vn8p5yibibnzi1sfa1xlw8iyx"))))
2998     (properties `((upstream-name . "R.cache")))
2999     (build-system r-build-system)
3000     (propagated-inputs
3001      `(("r-digest" ,r-digest)
3002        ("r-r-methodss3" ,r-r-methodss3)
3003        ("r-r-oo" ,r-r-oo)
3004        ("r-r-utils" ,r-r-utils)))
3005     (home-page "https://github.com/HenrikBengtsson/R.cache")
3006     (synopsis "Light-weight caching of objects and results")
3007     (description
3008      "This package provides methods for caching or memoization of objects and
3009 results.  With this package, any R object can be cached in a key-value storage
3010 where the key can be an arbitrary set of R objects.  The cache memory is
3011 persistent (on the file system).")
3012     (license license:lgpl2.1+)))
3014 (define-public r-r-rsp
3015   (package
3016     (name "r-r-rsp")
3017     (version "0.30.0")
3018     (source (origin
3019               (method url-fetch)
3020               (uri (cran-uri "R.rsp" version))
3021               (sha256
3022                (base32
3023                 "1ssykygqkxzx9qblxhavxlf2z6r5bhk0s47yw1dllfiyc8zy7jv2"))))
3024     (properties `((upstream-name . "R.rsp")))
3025     (build-system r-build-system)
3026     (propagated-inputs
3027      `(("r-r-cache" ,r-r-cache)
3028        ("r-r-methodss3" ,r-r-methodss3)
3029        ("r-r-oo" ,r-r-oo)
3030        ("r-r-utils" ,r-r-utils)))
3031     (home-page "https://github.com/HenrikBengtsson/R.rsp")
3032     (synopsis "Dynamic generation of scientific reports")
3033     (description
3034      "The RSP markup language provides a powerful markup for controlling the
3035 content and output of LaTeX, HTML, Markdown, AsciiDoc, Sweave and knitr
3036 documents (and more), e.g. @code{Today's date is <%=Sys.Date()%>}.  Contrary
3037 to many other literate programming languages, with RSP it is straightforward
3038 to loop over mixtures of code and text sections, e.g.  in month-by-month
3039 summaries.  RSP has also several preprocessing directives for incorporating
3040 static and dynamic contents of external files (local or online) among other
3041 things.  RSP is ideal for self-contained scientific reports and R package
3042 vignettes.")
3043     (license license:lgpl2.1+)))
3045 (define-public r-mvtnorm
3046   (package
3047     (name "r-mvtnorm")
3048     (version "1.0-5")
3049     (source (origin
3050               (method url-fetch)
3051               (uri (cran-uri "mvtnorm" version))
3052               (sha256
3053                (base32
3054                 "1pc1mi2h063gh4a40009xk5j6pf5bm4274i5kycln38dixsry3yh"))))
3055     (build-system r-build-system)
3056     (inputs
3057      `(("gfortran" ,gfortran)))
3058     (home-page "http://mvtnorm.R-forge.R-project.org")
3059     (synopsis "Package for multivariate normal and t-distributions")
3060     (description "This package can compute multivariate normal and
3061 t-probabilities, quantiles, random deviates and densities.")
3062     (license license:gpl2)))
3064 (define-public r-matrixstats
3065   (package
3066     (name "r-matrixstats")
3067     (version "0.51.0")
3068     (source (origin
3069               (method url-fetch)
3070               (uri (cran-uri "matrixStats" version))
3071               (sha256
3072                (base32
3073                 "0bsalx605kgb9nl7mfnq1qinkyd9s97p8plymsyfja1gmcnjrcpj"))))
3074     (properties `((upstream-name . "matrixStats")))
3075     (build-system r-build-system)
3076     (native-inputs
3077      `(("r-r-rsp" ,r-r-rsp))) ;used to build vignettes
3078     (home-page "https://github.com/HenrikBengtsson/matrixStats")
3079     (synopsis "Methods applying to vectors and matrix rows and columns")
3080     (description
3081      "This package provides methods operating on rows and columns of matrices,
3082 e.g.  @code{rowMedians()}, @code{rowRanks()}, and @code{rowSds()}.  There are
3083 also some vector-based methods, e.g. @code{binMeans()}, @code{madDiff()} and
3084 @code{weightedMedians()}.  All methods have been optimized for speed and
3085 memory usage.")
3086     (license license:artistic2.0)))
3088 (define-public r-viridis
3089   (package
3090     (name "r-viridis")
3091     (version "0.3.4")
3092     (source (origin
3093               (method url-fetch)
3094               (uri (cran-uri "viridis" version))
3095               (sha256
3096                (base32
3097                 "1a9hqn2pccpc51vh8ghw698ni6xzdnp8v0n8kgjh51nlz5hhc87j"))))
3098     (build-system r-build-system)
3099     (propagated-inputs
3100      `(("r-ggplot2" ,r-ggplot2)
3101        ("r-gridextra" ,r-gridextra)))
3102     (home-page "https://github.com/sjmgarnier/viridis")
3103     (synopsis "Matplotlib default color map")
3104     (description
3105      "This package is a port of the new @url{matplotlib,
3106 http://matplotlib.org/} color maps (@code{viridis}--the default--,
3107 @code{magma}, @code{plasma}, and @code{inferno}) to R.  These color maps are
3108 designed in such a way that they will analytically be perfectly
3109 perceptually-uniform, both in regular form and also when converted to
3110 black-and-white.  They are also designed to be perceived by readers with the
3111 most common form of color blindness.")
3112     (license license:x11)))
3114 (define-public r-viridislite
3115   (package
3116     (name "r-viridislite")
3117     (version "0.1.3")
3118     (source
3119      (origin
3120        (method url-fetch)
3121        (uri (cran-uri "viridisLite" version))
3122        (sha256
3123         (base32
3124          "1b0fhj8i1m9jsz91gzag60k7vy7kk5xkdg31rc3h3spq96l66psp"))))
3125     (properties `((upstream-name . "viridisLite")))
3126     (build-system r-build-system)
3127     (home-page "https://github.com/sjmgarnier/viridisLite")
3128     (synopsis "Default color maps from matplotlib")
3129     (description
3130      "This package is a port of the new @code{matplotlib} color maps ('viridis',
3131 'magma', 'plasma' and 'inferno') to R.  matplotlib is a popular plotting
3132 library for Python.  These color maps are designed in such a way that they
3133 will analytically be perfectly perceptually-uniform, both in regular form and
3134 also when converted to black-and-white.  They are also designed to be
3135 perceived by readers with the most common form of color blindness.  This is
3136 the 'lite' version of the more complete @code{viridis} package.")
3137     (license license:expat)))
3139 (define-public r-tidyr
3140   (package
3141     (name "r-tidyr")
3142     (version "0.6.0")
3143     (source
3144      (origin
3145        (method url-fetch)
3146        (uri (cran-uri "tidyr" version))
3147        (sha256
3148         (base32
3149          "1bpwbphgl43ym433b0nrshwhr7pprmj1wkpkamdzix1zvf9dcbc2"))))
3150     (build-system r-build-system)
3151     (propagated-inputs
3152      `(("r-dplyr" ,r-dplyr)
3153        ("r-lazyeval" ,r-lazyeval)
3154        ("r-magrittr" ,r-magrittr)
3155        ("r-rcpp" ,r-rcpp)
3156        ("r-stringi" ,r-stringi)))
3157     (home-page "https://github.com/hadley/tidyr")
3158     (synopsis "Tidy data with `spread()` and `gather()` functions")
3159     (description
3160      "tidyr is a reframing of the reshape2 package designed to accompany the
3161 tidy data framework, and to work hand-in-hand with magrittr and dplyr to build
3162 a solid pipeline for data analysis.  It is designed specifically for tidying
3163 data, not the general reshaping that reshape2 does, or the general aggregation
3164 that reshape did.  In particular, built-in methods only work for data frames,
3165 and tidyr provides no margins or aggregation.")
3166     (license license:expat)))
3168 (define-public r-hexbin
3169   (package
3170     (name "r-hexbin")
3171     (version "1.27.1")
3172     (source
3173      (origin
3174        (method url-fetch)
3175        (uri (cran-uri "hexbin" version))
3176        (sha256
3177         (base32
3178          "0xi6fbf1fvyn2gffr052n3viibqzpr3603sgi4xaminbzja4syjh"))))
3179     (build-system r-build-system)
3180     (propagated-inputs
3181      `(("r-lattice" ,r-lattice)))
3182     (native-inputs
3183      `(("gfortran" ,gfortran)))
3184     (home-page "http://github.com/edzer/hexbin")
3185     (synopsis "Hexagonal binning routines")
3186     (description
3187      "This package provides binning and plotting functions for hexagonal bins.
3188 It uses and relies on grid graphics and formal (S4) classes and methods.")
3189     (license license:gpl2+)))
3191 (define-public r-purrr
3192   (package
3193     (name "r-purrr")
3194     (version "0.2.2")
3195     (source
3196      (origin
3197        (method url-fetch)
3198        (uri (cran-uri "purrr" version))
3199        (sha256
3200         (base32
3201          "0lss8q733nv7s154wargm6vnxq55qygnxakib8xdj4jv0y86sxc3"))))
3202     (build-system r-build-system)
3203     (propagated-inputs
3204      `(("r-bh" ,r-bh)
3205        ("r-dplyr" ,r-dplyr)
3206        ("r-lazyeval" ,r-lazyeval)
3207        ("r-magrittr" ,r-magrittr)
3208        ("r-rcpp" ,r-rcpp)))
3209     (home-page "https://github.com/hadley/purrr")
3210     (synopsis "Functional programming tools")
3211     (description
3212      "This package completes R's functional programming tools with missing
3213 features present in other programming languages.")
3214     (license license:gpl3+)))
3216 (define-public r-plotly
3217   (package
3218     (name "r-plotly")
3219     (version "4.5.2")
3220     (source (origin
3221               (method url-fetch)
3222               (uri (cran-uri "plotly" version))
3223               (sha256
3224                (base32
3225                 "08shs0qhy9js0fpj3d4rzfbwmw11ki3z5vg8jszfm6m69mfkgzw1"))))
3226     (build-system r-build-system)
3227     (propagated-inputs
3228      `(("r-base64enc" ,r-base64enc)
3229        ("r-digest" ,r-digest)
3230        ("r-dplyr" ,r-dplyr)
3231        ("r-ggplot2" ,r-ggplot2)
3232        ("r-hexbin" ,r-hexbin)
3233        ("r-htmlwidgets" ,r-htmlwidgets)
3234        ("r-httr" ,r-httr)
3235        ("r-jsonlite" ,r-jsonlite)
3236        ("r-lazyeval" ,r-lazyeval)
3237        ("r-magrittr" ,r-magrittr)
3238        ("r-purrr" ,r-purrr)
3239        ("r-scales" ,r-scales)
3240        ("r-tibble" ,r-tibble)
3241        ("r-tidyr" ,r-tidyr)
3242        ("r-viridislite" ,r-viridislite)))
3243     (home-page "https://plot.ly/r")
3244     (synopsis "Create interactive web graphics")
3245     (description
3246      "This package enables the translation of ggplot2 graphs to an interactive
3247 web-based version and/or the creation of custom web-based visualizations
3248 directly from R.  Once uploaded to a plotly account, plotly graphs (and the
3249 data behind them) can be viewed and modified in a web browser.")
3250     (license license:x11)))
3252 (define-public r-biased-urn
3253   (package
3254    (name "r-biased-urn")
3255    (version "1.07")
3256    (source
3257     (origin
3258      (method url-fetch)
3259      (uri (cran-uri "BiasedUrn" version))
3260      (sha256
3261       (base32
3262        "13i2lgfnjhlbbm2yxfc2l5hswqw6x03pwba5csjmirv8kpjw4xr3"))))
3263    (properties `((upstream-name . "BiasedUrn")))
3264    (build-system r-build-system)
3265    (home-page "http://www.agner.org/random/")
3266    (synopsis "Biased urn model distributions")
3267    (description
3268     "This package provides statistical models of biased sampling in the form
3269 of univariate and multivariate noncentral hypergeometric distributions,
3270 including Wallenius' noncentral hypergeometric distribution and Fisher's
3271 noncentral hypergeometric distribution (also called extended hypergeometric
3272 distribution).")
3273    (license license:gpl3+)))
3275 (define-public r-rpart
3276   (package
3277     (name "r-rpart")
3278     (version "4.1-10")
3279     (source
3280      (origin
3281        (method url-fetch)
3282        (uri (cran-uri "rpart" version))
3283        (sha256
3284         (base32
3285          "119dvh2cpab4vq9blvbkil5hgq6w018amiwlda3ii0fki39axpf5"))))
3286     (build-system r-build-system)
3287     (home-page "http://cran.r-project.org/web/packages/rpart")
3288     (synopsis "Recursive partitioning and regression trees")
3289     (description
3290      "This package provides recursive partitioning functions for
3291 classification, regression and survival trees.")
3292     (license (list license:gpl2+ license:gpl3+))))
3294 (define-public r-survival
3295   (package
3296     (name "r-survival")
3297     (version "2.40-1")
3298     (source
3299      (origin
3300        (method url-fetch)
3301        (uri (cran-uri "survival" version))
3302        (sha256
3303         (base32
3304          "10pf0kq0g66k5rgizrvh29mq3r84acljw2jgrv5yp6z38xw23mci"))))
3305     (build-system r-build-system)
3306     (home-page "https://github.com/therneau/survival")
3307     (synopsis "Survival analysis")
3308     (description
3309      "This package contains the core survival analysis routines, including
3310 definition of Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state)
3311 curves, Cox models, and parametric accelerated failure time models.")
3312     (license license:lgpl2.0+)))
3314 (define-public r-hmisc
3315   (package
3316     (name "r-hmisc")
3317     (version "4.0-0")
3318     (source
3319      (origin
3320        (method url-fetch)
3321        (uri (cran-uri "Hmisc" version))
3322        (sha256
3323         (base32
3324          "0azxmg9h9c456biydc0wpi9xhljmd37m8bv0zaadbvc93g7x0l4b"))))
3325     (properties `((upstream-name . "Hmisc")))
3326     (build-system r-build-system)
3327     (native-inputs
3328      `(("gfortran" ,gfortran)))
3329     (propagated-inputs
3330      `(("r-acepack" ,r-acepack)
3331        ("r-cluster" ,r-cluster)
3332        ("r-data-table" ,r-data-table)
3333        ("r-foreign" ,r-foreign)
3334        ("r-formula" ,r-formula)
3335        ("r-ggplot2" ,r-ggplot2)
3336        ("r-gridextra" ,r-gridextra)
3337        ("r-gtable" ,r-gtable)
3338        ("r-lattice" ,r-lattice)
3339        ;; Hmisc needs survival >= 2.40.1, so it cannot use the survival
3340        ;; package that comes with R 3.3.1.
3341        ("r-survival" ,r-survival)
3342        ("r-latticeextra" ,r-latticeextra)
3343        ("r-htmltable" ,r-htmltable)
3344        ("r-htmltools" ,r-htmltools)
3345        ("r-viridis" ,r-viridis)
3346        ("r-nnet" ,r-nnet)
3347        ("r-rpart" ,r-rpart)))
3348     (home-page "http://biostat.mc.vanderbilt.edu/Hmisc")
3349     (synopsis "Miscellaneous data analysis and graphics functions")
3350     (description
3351      "This package contains many functions useful for data analysis,
3352 high-level graphics, utility operations, functions for computing sample size
3353 and power, importing and annotating datasets, imputing missing values,
3354 advanced table making, variable clustering, character string manipulation,
3355 conversion of R objects to LaTeX code, and recoding variables.")
3356     (license license:gpl2+)))
3358 (define-public r-runit
3359   (package
3360     (name "r-runit")
3361     (version "0.4.31")
3362     (source
3363      (origin
3364        (method url-fetch)
3365        (uri (cran-uri "RUnit" version))
3366        (sha256
3367         (base32
3368          "1jqr871jkll2xmk7wk5hv1z3a36hyn2ibgivw7bwk4b346940xlx"))))
3369     (properties `((upstream-name . "RUnit")))
3370     (build-system r-build-system)
3371     (home-page "http://cran.r-project.org/web/packages/RUnit")
3372     (synopsis "R unit test framework")
3373     (description
3374      "This package provides R functions implementing a standard unit testing
3375 framework, with additional code inspection and report generation tools.")
3376     (license license:gpl2+)))
3378 (define-public r-kernsmooth
3379   (package
3380     (name "r-kernsmooth")
3381     (version "2.23-15")
3382     (source
3383      (origin
3384        (method url-fetch)
3385        (uri (cran-uri "KernSmooth" version))
3386        (sha256
3387         (base32
3388          "1xhha8kw10jv8pv8b61hb5in9qiw3r2a9kdji3qlm991s4zd4wlb"))))
3389     (properties `((upstream-name . "KernSmooth")))
3390     (build-system r-build-system)
3391     (inputs
3392      `(("gfortran" ,gfortran)))
3393     (home-page "http://cran.r-project.org/web/packages/KernSmooth")
3394     (synopsis "Functions for kernel smoothing")
3395     (description
3396      "This package provides functions for kernel smoothing (and density
3397 estimation) corresponding to the book: Wand, M.P.  and Jones, M.C. (1995)
3398 \"Kernel Smoothing\".")
3399     ;; Unlimited use and distribution
3400     (license (license:non-copyleft "file://LICENSE.note"))))
3402 (define-public r-zoo
3403   (package
3404     (name "r-zoo")
3405     (version "1.7-13")
3406     (source (origin
3407               (method url-fetch)
3408               (uri (cran-uri "zoo" version))
3409               (sha256
3410                (base32
3411                 "0m67bnrg7r1jxvs9p7rpa430szp5qfp65r056yb8bivpc16jd98c"))))
3412     (build-system r-build-system)
3413     (propagated-inputs
3414      `(("r-lattice" ,r-lattice)))
3415     (home-page "http://zoo.R-Forge.R-project.org/")
3416     (synopsis "S3 infrastructure for regular and irregular time series")
3417     (description "This package contains an S3 class with methods for totally
3418 ordered indexed observations.  It is particularly aimed at irregular time
3419 series of numeric vectors/matrices and factors.")
3420     (license license:gpl2+)))
3422 (define-public r-ztable
3423   (package
3424     (name "r-ztable")
3425     (version "0.1.5")
3426     (source (origin
3427               (method url-fetch)
3428               (uri (cran-uri "ztable" version))
3429               (sha256
3430                (base32
3431                 "1jfqnqy9544gfvz3bsb48v4177nwp4b4n9l2743asq8sbq305b5r"))))
3432     (build-system r-build-system)
3433     (home-page "http://cran.r-project.org/web/packages/ztable")
3434     (synopsis "Zebra-striped tables in LaTeX and HTML formats for R")
3435     (description
3436      "This package provides functions to make zebra-striped tables (tables
3437 with alternating row colors) in LaTeX and HTML formats easily from
3438 @code{data.frame}, @code{matrix}, @code{lm}, @code{aov}, @code{anova},
3439 @code{glm}, @code{coxph}, @code{nls}, @code{fitdistr}, @code{mytable} and
3440 @code{cbind.mytable} objects.")
3441     (license license:gpl2+)))