{% set version = '0.4.1' %}

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

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

source:
  fn: survminer_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/survminer_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/survminer/survminer_{{ version }}.tar.gz
  sha256: 49ebbec862792e34f3bfd21521ffff190efa140763f0d21b76ff942fac5441d5

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-broom
    - r-cmprsk
    - r-dplyr
    - r-ggplot2
    - r-ggpubr >=0.1.3
    - r-gridextra >=2.0
    - r-magrittr
    - r-maxstat
    - r-purrr
    - r-scales
    - r-survmisc
    - r-survival
    - r-tibble
    - r-tidyr
  run:
    - r-base
    - r-broom
    - r-cmprsk
    - r-dplyr
    - r-ggplot2
    - r-ggpubr >=0.1.3
    - r-gridextra >=2.0
    - r-magrittr
    - r-maxstat
    - r-purrr
    - r-scales
    - r-survmisc
    - r-survival
    - r-tibble
    - r-tidyr

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

about:
  home: http://www.sthda.com/english/rpkgs/survminer/
  license: GPL-2
  summary: Contains the function 'ggsurvplot()' for drawing easily beautiful and 'ready-to-publish'
    survival curves with the 'number at risk' table and 'censoring count plot'. Other
    functions are also available to plot  adjusted curves for `Cox` model and to visually
    examine 'Cox' model assumptions.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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