Skip to content

Hierarchical Model of Species Communities

0packages dependsuggested by 2
27.9Kdownloads / year
29.8%test coverage
8/13flavors OK

Overview

About

Hierarchical Modelling of Species Communities (HMSC) is a model-based approach for analyzing community ecological data. This package implements it in the Bayesian framework with Gibbs Markov chain Monte Carlo (MCMC) sampling (Tikhonov et al. (2020) doi:10.1111/2041-210X.13345).

Changes in 3.3-7

New Features

  • Added a set of utilities to facilitate Common to Rare Transfer Learning (CORAL).
  • Added integration with Hmsc-HPC add-on for delegating MCMC to TensorFlow.
  • Added function computeSAIR for shared and idiosyncratic responses to measured and latent predictors.
  • Failed updaters are only recorded during sampling. Failed updates can be detected in more cases (V, Z).

Bug Fixes

  • Legend for plotVariancePartitioning had two entries for Random when there were no random levels.
Show all changes in 3.3-7Hide the rest of the changes in 3.3-7
  • predict could fail when there were no random levels.

From inst/NEWS.md in the release

Install

Health

CRAN checks
5NOTE8OK
Check messages
NOTEfor differences from example reference outputr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Comparing ‘Hmsc-Ex.Rout’ to ‘Hmsc-Ex.Rout.save’:
227,6626d226
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length
...[truncated]...

< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length

r-devel-windows-x86_64

Comparing 'Hmsc-Ex.Rout' to 'Hmsc-Ex.Rout.save':
227,6626d226
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length
...[truncated]...

< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 1 is not a multiple of logical subscript length
< Warning in cM[sel, sel] :
<   length of dimension 2 is not a multiple of logical subscript length
< Warning in Beta[sel, j] :
<   length of dimension 1 is not a multiple of logical subscript length

CRAN check page ↗

Slowest check: 4.3 min · r-oldrel-windows-x86_64
Status changes
  • NOTE8 OK, 5 NOTENow
  • NOTE12 OK, 1 NOTE2026-09-13
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 3.3-7
READMEYes · 522 wordsVignettesYes · 10 · staticNEWSYes · 100% structured · mentions 3.3-7Citation fileNoWebsiteYes
Help pages
42 (1 internal)includes a package overview page
Examples that run
100%24 run in a plain check
Exported functions with examples
68%
Documented parameters
98%
Return-value docs
85%
Help pages citing references
0%

Downloads

27.9K
CRAN downloads in the past year
Rank #3,259 · ~76/day · ~2.3K/mo
Daily download trend is not available in this view yet.
1.4K30 days
3.5K90 days
27.9K1 year
Compare downloads with other packages →
Also on161 r2u4 autocran1.7K conda_forge68 c2d4u

Repository

hmsc-r/hmsc ↗Organization: hmsc-r
121Stars
40Forks
128Open issues
2Open PRs
6Releases
1,060Commits
17Commit identities
License file reads as GPL-3.0 · 1,060 commits · Last activity 2026-06-26 · +0.8% stars, 30d · Default branch at 3.4-1, ahead of CRAN 3.3-7 (checked 2026-10-22)
Responsiveness
How these are sampled
PRs merged (all time)
71%
Median days to close, 50 most recently updated closed issues
6
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2026-07-14 · 1192026-09-28 · 121
PracticesBeta

5 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/hmsc-r/hmsc on 2026-10-22.

Continuous integration (3)
GitHub ActionsR CMD check workflowTravis CI (config file)

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Reproducibility and dev environment (1)
data-raw/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
18 external dependencies (excludes base and recommended)

Installing Hmsc adds 39 packages (25 with compiled code, 36 MB of source tarballs). Heaviest: ggplot2 6.0 MB, sp 4.3 MB, fields 3.9 MB.

Depends (2)
R >= 3.0.2coda
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 2
Suggests, most downloaded first

Datasets

People & History

People (6)
Author, Maintainer since 3.0-2 (2019)
Listed in earlier versions (1)
Melinda
no longer listed · 3.0-2 to 3.3-7
Releases (7)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 3.3-7Latest
    record
    2025-08-29 · current release · diff ↗ ·
    added 10 exports
    computeSAIR, coralCombine, coralGetRareSpeciesPriors, coralGetXDataExt, coralPlotBeta, coralPredict, coralPreprocess, coralSplitToBatches, coralTrain, importPosteriorFromHPC
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 3.0-13
    record
    2022-08-11 · diff ↗ ·
    added 1 export
    pcomputePredictedValues
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 3.0-11
    record
    2021-02-24 · diff ↗
  • 3.0-9
    record
    2020-10-29 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 3.0-6
    record
    2020-03-19 · diff ↗
  • 3.0-4
    record
    2019-12-16 · diff ↗
  • 3.0-2
    record
    2019-10-13
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2019-10-13
Total releases
7 / 7 yrs
License
GPL-3 | file LICENSE OSI
Minimum R
≥ 3.0.2
Bundled data
294 KB / 1 file
Download size
2.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("Hmsc")
Ovaskainen, O., Dallas, T., Oksanen, J., Opedal, O., Tikhonov, G., & de Jonge, M. (2025). Hmsc: Hierarchical Model of Species Communities (Version 3.3-7) [Computer software]. https://doi.org/10.32614/CRAN.package.Hmsc

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for Hmsc version 3.3-7 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy