{% set version = '3.32-1' %}

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

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

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

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

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

requirements:
  build:
    - r-base
    - r-matrix
    - r-lattice
    - r-survival

  run:
    - r-base
    - r-matrix
    - r-lattice
    - r-survival

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

about:
  home: http://r-survey.r-forge.r-project.org/survey/
  license: GPL-2 | GPL-3
  summary: Summary statistics, two-sample tests, rank tests, generalised linear models, cumulative
    link models, Cox models, loglinear models, and general maximum pseudolikelihood
    estimation for multistage stratified, cluster-sampled, unequally weighted survey
    samples. Variances by Taylor series linearisation or replicate weights. Post-stratification,
    calibration, and raking. Two-phase subsampling designs. Graphics. PPS sampling without
    replacement. Principal components, factor analysis.
  license_family: GPL3

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