aboutsummaryrefslogtreecommitdiff
path: root/km-packages/r.scm
blob: 2c4e6db926760cd9b48288a940dbdd28d6c80efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
;;; r.scm --- custom Guix pakcages for R
;;;
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;;
;;; This file is NOT part of GNU Guix.
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
;;; published by the Free Software Foundation, either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program.  If not, see
;;; <https://www.gnu.org/licenses/>.

;;; Commentary:
;;;
;;; NOTE: These packages are quite stale and very likely do not work
;;; with the current Guix.

(define-module (km-packages r)
  #:use-module (gnu packages)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages cran)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages graph)
  #:use-module (gnu packages haskell)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages statistics)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages web)
  #:use-module (guix build-system r)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages))

(define-public r-stanheaders
  (package
    (name "r-stanheaders")
    (version "2.16.0-1")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "StanHeaders" version))
       (sha256
        (base32
         "0i1gq32ys7iwgbdrwc86ww8kj5aqc7jbl663dynackb7wmqwlb7r"))))
    (properties `((upstream-name . "StanHeaders")))
    (build-system r-build-system)
    (home-page "http://mc-stan.org/")
    (synopsis "C++ header files for Stan")
    (description
     "Prvoides the C++ header files of the Stan project used by
@code{r-rstan}.")
    (license license:bsd-3)))

(define-public r-rstan
  (package
    (name "r-rstan")
    (version "2.16.2")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "rstan" version))
       (sha256
        (base32
         "0irqh4ggk23s3c0ipihwv8m0qmkxh5j7vdxgnsarhqca6254r2vb"))))
    (build-system r-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-dates
           (lambda _
             (substitute* "R/zzz.R"
               (("value = Sys.time\\(\\)")
                "value = as.POSIXct(\"1970-1-1 00:00:00\", tz = \"UTC\")")
               ;; Prevent build failure for "character string is not
               ;; in a standard unambiguous format".
               (("as.POSIXct\\(\"1970-01-01 00:00.00 UTC\"\\)")
                "as.POSIXct(\"1970-1-1 00:00:00\", tz = \"UTC\")")))))))
    (propagated-inputs
     `(("r-bh" ,r-bh)
       ("r-ggplot2" ,r-ggplot2)
       ("r-gridextra" ,r-gridextra)
       ("r-inline" ,r-inline)
       ("r-rcpp" ,r-rcpp)
       ("r-rcppeigen" ,r-rcppeigen)
       ("r-stanheaders" ,r-stanheaders)))
    (home-page "http://mc-stan.org/users/interfaces/rstan.html")
    (synopsis "R interface to Stan")
    (description
     "User-facing R functions are provided to parse, compile, test,
estimate, and analyze Stan models by accessing the header-only Stan
library provided by @code{r-stanheaders}.  The Stan project develops a
probabilistic programming language that implements full Bayesian
statistical inference via Markov Chain Monte Carlo, rough Bayesian
inference via 'variational' approximation, and (optionally penalized)
maximum likelihood estimation via optimization.  In all three cases,
automatic differentiation is used to quickly and accurately evaluate
gradients without burdening the user with the need to derive the
partial derivatives.")
    (license license:gpl3+)))

(define-public r-shinyjs
  (package
    (name "r-shinyjs")
    (version "0.9.1")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "shinyjs" version))
       (sha256
        (base32
         "0h90k4f93lbfraldjxlbhjyjr54c3hiv7gyrbqz70j08s0bhyama"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-digest" ,r-digest)
       ("r-htmltools" ,r-htmltools)
       ("r-jsonlite" ,r-jsonlite)
       ("r-miniui" ,r-miniui)
       ("r-shiny" ,r-shiny)))
    (home-page "http://deanattali.com/shinyjs")
    (synopsis
     "Easily Improve the User Experience of Your Shiny Apps in Seconds")
    (description
     "Perform common useful JavaScript operations in Shiny apps that
will greatly improve your apps without having to know any JavaScript.
Examples include: hiding an element, disabling an input, resetting an
input back to its original value, delaying code execution by a few
seconds, and many more useful functions for both the end user and the
developer. 'shinyjs' can also be used to easily call your own custom
JavaScript functions from R.")
    (license license:agpl3+)))

(define-public r-colourpicker
  (package
    (name "r-colourpicker")
    (version "0.3")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "colourpicker" version))
       (sha256
        (base32
         "0sxxllfwdbdc283nk9b82xrvb6xali14c6qfywm2qck0k8jh7ppy"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-ggplot2" ,r-ggplot2)
       ("r-htmltools" ,r-htmltools)
       ("r-htmlwidgets" ,r-htmlwidgets)
       ("r-miniui" ,r-miniui)
       ("r-shiny" ,r-shiny)
       ("r-shinyjs" ,r-shinyjs)))
    (home-page
     "https://github.com/daattali/colourpicker")
    (synopsis
     "A Colour Picker Tool for Shiny and for Selecting Colours in Plots")
    (description
     "This package provides a colour picker that can be used as an
input in Shiny apps or 'Rmarkdown' documents.  A Plot Colour Helper
tool is available as an 'RStudio' addin, which helps you pick colours
to use in your plots.  A more generic Colour Picker 'RStudio' addin is
also provided to let you select colours for use in your R code.")
    (license license:expat)))

(define-public r-dygraphs
  (package
    (name "r-dygraphs")
    (version "1.1.1.4")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "dygraphs" version))
       (sha256
        (base32
         "0vwg9q7xrwxkm92d55ik9gdky42bj3jlh6fi4jzwyl5nfdswklb9"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-htmltools" ,r-htmltools)
       ("r-htmlwidgets" ,r-htmlwidgets)
       ("r-magrittr" ,r-magrittr)
       ("r-xts" ,r-xts)
       ("r-zoo" ,r-zoo)))
    (home-page "https://github.com/rstudio/dygraphs")
    (synopsis
     "Interface to 'Dygraphs' Interactive Time Series Charting Library")
    (description
     "An R interface to the 'dygraphs' JavaScript charting library (a
copy of which is included in the package).  Provides rich facilities
for charting time-series data in R, including highly configurable
series- and axis-display and interactive features like zoom/pan and
series/point highlighting.")
    (license #f)))

(define-public r-packrat
  (package
    (name "r-packrat")
    (version "0.4.8-1")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "packrat" version))
       (sha256
        (base32
         "1wvjyvb7yy6hq188msqzf8qa00lhll865jp939byc6d4zpscm0x2"))))
    (build-system r-build-system)
    (home-page "https://github.com/rstudio/packrat/")
    (synopsis
     "A Dependency Management System for Projects and their R Package Dependencies")
    (description
     "Manage the R packages your project depends on in an isolated,
portable, and reproducible way.")
    (license license:gpl2)))

(define-public r-pki
  (package
    (name "r-pki")
    (version "0.1-3")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "PKI" version))
       (sha256
        (base32
         "1xhc84k4iszvfawwwzrwclfs41nvb8bmyygapxmsxjky725s7k1g"))))
    (properties `((upstream-name . "PKI")))
    (build-system r-build-system)
    (native-inputs
     `(("openssl" ,openssl)))
    (propagated-inputs
     `(("r-base64enc" ,r-base64enc)))
    (home-page "http://www.rforge.net/PKI")
    (synopsis
     "Public Key Infrastucture for R Based on the X.509 Standard")
    (description
     "PKI functions such as verifying certificates, RSA encription and
signing which can be used to build PKI infrastructure and perform
cryptographic tasks.")
    (license #f)))

(define-public r-rjsonio
  (package
    (name "r-rjsonio")
    (version "1.3-0")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "RJSONIO" version))
       (sha256
        (base32
         "1dwgyiy19sixhy6yclqcaaxswbmpq7digyjjxhy1qv0wfsvk94qi"))))
    (properties `((upstream-name . "RJSONIO")))
    (build-system r-build-system)
    (home-page
     "http://cran.r-project.org/web/packages/RJSONIO")
    (synopsis
     "Serialize R objects to JSON, JavaScript Object Notation")
    (description
     "This is a package that allows conversion to and from data in
Javascript object notation (JSON) format.  This allows R objects to be
inserted into Javascript/ECMAScript/ActionScript code and allows R
programmers to read and convert JSON content to R objects.  This is an
alternative to rjson package.  Originally, that was too slow for
converting large R objects to JSON and was not extensible.  rjson's
performance is now similar to this package, and perhaps slightly
faster in some cases.  This package uses methods and is readily
extensible by defining methods for different classes, vectorized
operations, and C code and callbacks to R functions for deserializing
JSON objects to R.  The two packages intentionally share the same
basic interface.  This package (RJSONIO) has many additional options
to allow customizing the generation and processing of JSON content.
This package uses libjson rather than implementing yet another JSON
parser.  The aim is to support other general projects by building on
their work, providing feedback and benefit from their ongoing
development.")
    (license license:bsd-3)))

(define-public r-rsconnect
  (package
    (name "r-rsconnect")
    (version "0.8.5")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "rsconnect" version))
       (sha256
        (base32
         "0y2sajcw1yngig06l7bxzcw993jbx13fl47fag9fa4f70qpnnwmq"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-digest" ,r-digest)
       ("r-packrat" ,r-packrat)
       ("r-pki" ,r-pki)
       ("r-rcurl" ,r-rcurl)
       ("r-rjsonio" ,r-rjsonio)
       ("r-rstudioapi" ,r-rstudioapi)
       ("r-yaml" ,r-yaml)))
    (home-page
     "http://cran.r-project.org/web/packages/rsconnect")
    (synopsis
     "Deployment Interface for R Markdown Documents and Shiny Applications")
    (description
     "Programmatic deployment interface for 'RPubs', 'shinyapps.io',
and 'RStudio Connect'.  Supported content types include R Markdown
documents, Shiny applications, Plumber APIs, plots, and static web
content.")
    (license license:gpl2)))

(define-public r-shinythemes
  (package
    (name "r-shinythemes")
    (version "1.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "shinythemes" version))
       (sha256
        (base32
         "0i220y051dq763idh1j5zhpb5cpv3jr11jd9akmry9aadyys5pz6"))))
    (build-system r-build-system)
    (propagated-inputs `(("r-shiny" ,r-shiny)))
    (home-page
     "http://cran.r-project.org/web/packages/shinythemes")
    (synopsis "Themes for Shiny")
    (description
     "Themes for use with Shiny.  Includes several Bootstrap themes
from <http://bootswatch.com/>, which are packaged for use with Shiny
applications.")
    (license #f)))

(define-public r-threejs
  (package
    (name "r-threejs")
    (version "0.3.1")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "threejs" version))
       (sha256
        (base32
         "1s3rdlzy7man6177ycayg6xsh6k8y1r9rdj9yzn3b93j2rs0nxbi"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-base64enc" ,r-base64enc)
       ("r-crosstalk" ,r-crosstalk)
       ("r-htmlwidgets" ,r-htmlwidgets)
       ("r-igraph" ,r-igraph)))
    (home-page "https://bwlewis.github.io/rthreejs")
    (synopsis
     "Interactive 3D Scatter Plots, Networks and Globes")
    (description
     "Create interactive 3D scatter plots, network plots, and globes
using the 'three.js' visualization library (<https://threejs.org>).")
    (license license:expat)))

(define-public r-shinystan
  (package
    (name "r-shinystan")
    (version "2.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (cran-uri "shinystan" version))
       (sha256
        (base32
         "18bdh2h6grlwfx6p00214p7cgzg7zfhbvnkd1dmxihp9wf4l80af"))))
    (build-system r-build-system)
    (propagated-inputs
     `(("r-bayesplot" ,r-bayesplot)
       ("r-colourpicker" ,r-colourpicker)
       ("r-dt" ,r-dt)
       ("r-dygraphs" ,r-dygraphs)
       ("r-ggplot2" ,r-ggplot2)
       ("r-gridextra" ,r-gridextra)
       ("r-gtools" ,r-gtools)
       ("r-markdown" ,r-markdown)
       ("r-reshape2" ,r-reshape2)
       ("r-rsconnect" ,r-rsconnect)
       ("r-rstan" ,r-rstan)
       ("r-shiny" ,r-shiny)
       ("r-shinyjs" ,r-shinyjs)
       ("r-shinythemes" ,r-shinythemes)
       ("r-threejs" ,r-threejs)
       ("r-xtable" ,r-xtable)
       ("r-xts" ,r-xts)))
    (home-page "http://mc-stan.org/")
    (synopsis
     "Interactive Visual and Numerical Diagnostics and Posterior Analysis for Bayesian Models")
    (description
     "This package provides a graphical user interface for interactive Markov chain Monte Carlo (MCMC) diagnostics and plots and tables helpful for analyzing a posterior sample.  The interface is powered by the 'Shiny' web application framework from 'RStudio' and works with the output of MCMC programs written in any programming language (and has extended functionality for 'Stan' models fit using the 'rstan' and 'rstanarm' packages).")
    (license license:gpl3+)))