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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/stm_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/stm/stm_{{ version }}.tar.gz
  sha256: 0be6b79034fd711d44a56339360d818fedacce4459146440932e5961a3259863

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
    - r-rcpp >=0.11.3
    - r-rcpparmadillo
    - r-data.table
    - r-glmnet
    - r-lda
    - r-matrixstats
    - r-quadprog
    - r-quanteda
    - r-slam
    - r-stringr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rcpp >=0.11.3
    - r-rcpparmadillo
    - r-data.table
    - r-glmnet
    - r-lda
    - r-matrixstats
    - r-quadprog
    - r-quanteda
    - r-slam
    - r-stringr

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

about:
  home: http://structuraltopicmodel.com
  license: MIT
  summary: The Structural Topic Model (STM) allows researchers to estimate topic models with document-level covariates. The package also includes tools for model selection, visualization, and estimation of topic-covariate regressions. Methods developed in Roberts et al (2014) <doi:10.1111/ajps.12103> and Roberts et al (2016)
    <doi:10.1080/01621459.2016.1141684>. Vignette is Roberts et al (2019) <doi:10.18637/jss.v091.i02>.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: stm
# Title: Estimation of the Structural Topic Model
# Version: 1.3.4
# Authors@R: c( person("Margaret", "Roberts", email="meroberts@ucsd.edu", role="aut"), person("Brandon", "Stewart", email="bms4@princeton.edu", role=c("aut","cre")), person("Dustin", "Tingley", email="dtingley@gov.harvard.edu", role="aut"), person("Kenneth","Benoit", email="kbenoit@lse.ac.uk", role="ctb"))
# Description: The Structural Topic Model (STM) allows researchers to estimate topic models with document-level covariates. The package also includes tools for model selection, visualization, and estimation of topic-covariate regressions. Methods developed in Roberts et al (2014) <doi:10.1111/ajps.12103> and Roberts et al (2016) <doi:10.1080/01621459.2016.1141684>. Vignette is Roberts et al (2019) <doi:10.18637/jss.v091.i02>.
# Depends: R (>= 3.2.2), methods
# LinkingTo: Rcpp, RcppArmadillo
# Imports: Rcpp (>= 0.11.3), data.table, glmnet, grDevices, graphics, lda, Matrix, matrixStats, parallel, quadprog, quanteda, slam, splines, stats, stringr, utils
# Suggests: clue, geometry, huge, igraph, LDAvis, KernSmooth, NLP, rsvd, Rtsne, SnowballC, spelling, testthat, tm (>= 0.6), wordcloud
# Encoding: UTF-8
# LazyData: yes
# License: MIT + file LICENSE
# URL: http://structuraltopicmodel.com
# BugReports: https://github.com/bstewart/stm/issues
# RoxygenNote: 6.1.1
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2019-10-29 22:30:43 UTC; brandonstewart
# Author: Margaret Roberts [aut], Brandon Stewart [aut, cre], Dustin Tingley [aut], Kenneth Benoit [ctb]
# Maintainer: Brandon Stewart <bms4@princeton.edu>
# Repository: CRAN
# Date/Publication: 2019-10-30 09:00:03 UTC
