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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/bnstruct_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/bnstruct/bnstruct_{{ version }}.tar.gz
  sha256: 51719855401d2d6b0286c787c89f2add1f7c740e411638b42472d95ace57956e

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-matrix
    - r-bitops
    - r-igraph
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-bitops
    - r-igraph

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

about:
  home: https://CRAN.R-project.org/package=bnstruct
  license: GPL-2.0-or-later
  summary: Bayesian Network Structure Learning from Data with Missing Values. The package implements the Silander-Myllymaki complete search, the Max-Min Parents-and-Children, the Hill-Climbing, the Max-Min Hill-climbing heuristic searches, and the Structural Expectation-Maximization algorithm. Available scoring functions
    are BDeu, AIC, BIC. The package also implements methods for generating and using bootstrap samples, imputed data, inference.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - SGMartin

# Package: bnstruct
# Description: Bayesian Network Structure Learning from Data with Missing Values. The package implements the Silander-Myllymaki complete search, the Max-Min Parents-and-Children, the Hill-Climbing, the Max-Min Hill-climbing heuristic searches, and the Structural Expectation-Maximization algorithm. Available scoring functions are BDeu, AIC, BIC. The package also implements methods for generating and using bootstrap samples, imputed data, inference.
# Type: Package
# Title: Bayesian Network Structure Learning from Data with Missing Values
# Version: 1.0.8
# Date: 2020-05-022
# Depends: R (>= 3.5.0), bitops, Matrix, igraph, methods
# Suggests: graph, Rgraphviz, qgraph, knitr, testthat
# Authors@R: c(person("Francesco", "Sambo", role=c("aut"), email="magodellepercussioni@gmail.com"), person("Alberto", "Franzin", role=c("aut","cre"), email="afranzin@ulb.ac.be"))
# License: GPL (>= 2) | file LICENSE
# Encoding: UTF-8
# RoxygenNote: 7.1.0
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2020-05-22 16:29:43 UTC; alberto
# Author: Francesco Sambo [aut], Alberto Franzin [aut, cre]
# Maintainer: Alberto Franzin <afranzin@ulb.ac.be>
# Repository: CRAN
# Date/Publication: 2020-05-22 17:10:05 UTC
