From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: [PATCH 04/18] gnu: Add r-spams.
Date: Thu, 24 Nov 2016 17:51:25 +0100 [thread overview]
Message-ID: <20161124165139.13740-5-rekado@elephly.net> (raw)
In-Reply-To: <20161124165139.13740-1-rekado@elephly.net>
* gnu/packages/statistics.scm (r-spams): New variable.
---
gnu/packages/statistics.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 0ba3316..dcf6dbe 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -3342,6 +3342,58 @@ character vector.")
from within R.")
(license license:expat)))
+(define-public r-spams
+ (package
+ (name "r-spams")
+ (version "2.5-svn2014-07-04")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://gforge.inria.fr/frs/download.php/33815/"
+ "spams-R-v" version ".tar.gz"))
+ (sha256
+ (base32
+ "1k459jg9a334slkw31w63l4d39xszjzsng7dv5j1mp78zifz7hvx"))))
+ (build-system r-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "spams") #t))
+ ;; Since R 3.3.0 including R headers inside of an extern "C" block
+ ;; causes C headers to be included, which results in a lot of
+ ;; duplicate definitions. This can be avoided by defining
+ ;; NO_C_HEADERS before including the R headers.
+ (add-after 'chdir 'patch-use-of-R-headers
+ (lambda _
+ (substitute* "src/spams.cpp"
+ (("#include <R.h>" line)
+ (string-append "#define NO_C_HEADERS\n" line)))
+ #t))
+ ;; This looks like a syntax error.
+ (add-after 'chdir 'patch-isnan
+ (lambda _
+ (substitute* '"src/spams/linalg/linalg.h"
+ (("if isnan\\(lambda\\) \\{")
+ "if (isnan(lambda)) {"))
+ #t)))))
+ (home-page "http://spams-devel.gforge.inria.fr")
+ (synopsis "Toolbox for solving sparse estimation problems")
+ (description "SPAMS (SPArse Modeling Software) is an optimization toolbox
+for solving various sparse estimation problems. It includes tools for the
+following problems:
+
+@enumerate
+@item Dictionary learning and matrix factorization (NMF, sparse @dfn{principle
+ component analysis} (PCA), ...)
+@item Solving sparse decomposition problems with LARS, coordinate descent,
+ OMP, SOMP, proximal methods
+@item Solving structured sparse decomposition problems (l1/l2, l1/linf, sparse
+ group lasso, tree-structured regularization, structured sparsity with
+ overlapping groups,...).
+@end enumerate\n")
+ (license license:gpl3+)))
+
(define-public r-rpart
(package
(name "r-rpart")
--
2.10.2
next prev parent reply other threads:[~2016-11-24 16:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 16:51 [PATCH 00/18] Add R packages Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 01/18] gnu: Add r-rematch Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 02/18] gnu: Add r-cellranger Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 03/18] gnu: Add r-googlesheets Ricardo Wurmus
2016-11-24 16:51 ` Ricardo Wurmus [this message]
2016-11-25 4:12 ` [PATCH 04/18] gnu: Add r-spams Leo Famulari
2016-11-28 21:39 ` Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 05/18] gnu: Add r-r4rna Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 06/18] gnu: Add r-dynamictreecut Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 07/18] gnu: Add r-preprocesscore Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 08/18] gnu: Add r-fastcluster Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 09/18] gnu: Add r-wgcna Ricardo Wurmus
2016-11-25 10:38 ` Ben Woodcroft
2016-11-28 21:45 ` Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 10/18] gnu: Add r-sfsmisc Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 11/18] gnu: Add r-kernlab Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 12/18] gnu: Add r-gtools Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 13/18] gnu: Add r-chipkernels Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 14/18] gnu: Add r-seqgl Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 15/18] gnu: Add r-gdata Ricardo Wurmus
2016-11-25 4:17 ` Leo Famulari
2016-11-24 16:51 ` [PATCH 16/18] gnu: Add r-gplots Ricardo Wurmus
2016-11-25 4:16 ` Leo Famulari
2016-11-25 22:53 ` Ludovic Courtès
2016-11-28 21:47 ` Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 17/18] gnu: Add r-rocr Ricardo Wurmus
2016-11-24 16:51 ` [PATCH 18/18] gnu: Add r-gkmsvm Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161124165139.13740-5-rekado@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).