{% set version = '0.9' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-rsvd
  version: {{ version|replace("-", "_") }}

source:
  fn: rsvd_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rsvd_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rsvd/rsvd_{{ version }}.tar.gz
  sha256: c91f0abd50f5b8008a99b2f3bd046b1ca91dc0d0de9714b0d2fcbe2332f1e1b4

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-ggplot2

  run:
    - r-base
    - r-ggplot2

test:
  commands:
    - $R -e "library('rsvd')"           # [not win]
    - "\"%R%\" -e \"library('rsvd')\""  # [win]

about:
  home: https://github.com/erichson/rSVD
  license: GPL (>= 2)
  summary: Low-rank matrix decompositions are fundamental tools and widely used for data analysis,
    dimension reduction, and data compression. Classically, highly accurate  deterministic
    matrix algorithms are used for this task. However, the emergence of  large-scale
    data has severely challenged our computational ability to analyze big data.  The
    concept of randomness has been demonstrated as an effective strategy to quickly
    produce approximate answers to familiar problems such as the singular value decomposition
    (SVD).  The rsvd package provides several randomized matrix algorithms such as the
    randomized  singular value decomposition (rsvd), randomized principal component
    analysis (rpca),  randomized robust principal component analysis (rrpca), randomized
    interpolative  decomposition (rid), and the randomized CUR decomposition (rcur).
    In addition several plot  functions are provided.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
