{% set version = '1.0-3' %}

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

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

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


  sha256: 23bb6690ae15e9ede3198ef55d5d3236c279aa8fa6bd4f7350242379d9d72673

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

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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



about:
  home: https://www.stat.auckland.ac.nz/~yee/VGAM
  license: GPL-2 | GPL-3
  summary: 'An implementation of about 6 major classes of statistical regression models. At the
    heart of it are the vector generalized linear and additive model (VGLM/VGAM) classes,
    and the book "Vector Generalized Linear and Additive Models: With an Implementation
    in R" (Yee, 2015) <DOI:10.1007/978-1-4939-2818-7> gives details of the statistical
    framework and VGAM package. Currently only fixed-effects models are implemented,
    i.e., no random-effects models. Many (150+) models and distributions are estimated
    by maximum likelihood estimation (MLE) or penalized MLE, using Fisher scoring. VGLMs
    can be loosely thought of as multivariate GLMs. VGAMs are data-driven VGLMs (i.e.,
    with smoothing). The other classes are RR-VGLMs (reduced-rank VGLMs), quadratic
    RR-VGLMs, reduced-rank VGAMs, RCIMs (row-column interaction models)---these classes
    perform constrained and unconstrained quadratic ordination (CQO/UQO) models in ecology,
    as well as constrained additive ordination (CAO). Note that these functions are
    subject to change; see the NEWS and ChangeLog files for latest changes.'

  license_family: GPL3

extra:
  recipe-maintainers:
    - croth1
