{% set name = "r-permute" %}
{% set version = "0.9-4" %}
{% set sha256 = "a541a5f5636ddd67fd856d3e11224f15bc068e96e23aabe3e607a7e7c2fc1cf1" %}

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

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

build:
  number: 1
  skip: true  # [win32]
  script: R CMD INSTALL --build .
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/gavinsimpson/permute
  license: GPL 2
  summary: 'Restricted permutations with R'
  description: |
    A set of restricted permutation designs for freely exchangeable, line transects (time series), and spatial
    grid designs plus permutation of blocks (groups of samples) is provided. 'permute' also allows split-plot designs,
    in which the whole-plots or split-plots or both can be freely-exchangeable or one of the restricted designs. The
    'permute' package is modelled after the permutation schemes of 'Canoco 3.1' (and later) by Cajo ter Braak.
  doc_url: https://cran.r-project.org/web/packages/permute/permute.pdf

extra:
  recipe-maintainers:
    - daf
    - ocefpaf
    - johanneskoester
    - bgruening
