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

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

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

source:
  fn: Hmisc_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/Hmisc_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/Hmisc/Hmisc_{{ version }}.tar.gz
  sha256: 1c612a72eeb618e624f131475f15d4a15b7e2044ad2045d56bf49aa7be3af1a8

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

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

requirements:
  build:
    - r-base
    - r-formula
    - r-acepack
    - r-base64enc
    - r-cluster
    - r-data.table
    - r-foreign
    - r-ggplot2 >=2.2
    - r-gridextra
    - r-gtable
    - r-htmltable
    - r-htmltools
    - r-lattice
    - r-latticeextra
    - r-nnet
    - r-rpart
    - r-survival >=2.40_1
    - r-viridis
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-formula
    - r-acepack
    - r-base64enc
    - r-cluster
    - r-data.table
    - r-foreign
    - r-ggplot2 >=2.2
    - r-gridextra
    - r-gtable
    - r-htmltable
    - r-htmltools
    - r-lattice
    - r-latticeextra
    - r-nnet
    - r-rpart
    - r-survival >=2.40_1
    - r-viridis
    - libgcc  # [not win]

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

about:
  home: http://biostat.mc.vanderbilt.edu/Hmisc, https://github.com/harrelfe/Hmisc
  license: GPL (>= 2)
  summary: Contains many functions useful for data analysis, high-level graphics, utility operations,
    functions for computing sample size and power, importing and annotating datasets,
    imputing missing values, advanced table making, variable clustering, character string
    manipulation, conversion of R objects to LaTeX and html code, and recoding variables.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
