Skip to content

Bayesian Trophic Position Models using 'stan'

0packages depend
2.2Kdownloads / year
100.0%test coverage
10/13flavors OK

Overview

About

Bayesian trophic position models using 'stan' by leveraging 'brms' for stable isotope data. Trophic position models are derived by using equations from Post (2002) doi:10.1890/0012-9658(2002)083[0703:USITET]2.0.CO;2, Vander Zanden and Vadeboncoeur (2002) doi:10.1890/0012-9658(2002)083[2152:FAIOBA]2.0.CO;2, and Heuvel et al. (2024) doi:10.1139/cjfas-2024-0028.

Changes in 0.1.0

18-Mar-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [x] a two-source model without different lambda
  • [x] priors for a two-source model without different lambda
  • [x] parameters for priors for a two-source model without different lambda
  • [x] a two-source model with different lambda
  • [x] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [x] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [x] a two-source carbon mixing model
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • [x] priors and parameters for priors
  • [x] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [x] priors
  • [x] parameters for priors
  • [x] vignettes for one source
  • [x] vignettes for two source
  • [x] vignettes for twp source ar

17-Mar-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [x] a two-source model without different lambda
  • [x] priors for a two-source model without different lambda
  • [x] parameters for priors for a two-source model without different lambda
  • [x] a two-source model with different lambda
  • [x] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [x] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [x] a two-source carbon mixing model
  • [x] priors and parameters for priors
  • [x] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [x] priors
  • [x] parameters for priors
  • [x] vignettes for one source
  • [x] vignettes for two source
  • [] vignettes for twp source ar

14-Mar-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [x] a two-source model without different lambda
  • [x] priors for a two-source model without different lambda
  • [x] parameters for priors for a two-source model without different lambda
  • [x] a two-source model with different lambda
  • [x] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [x] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [x] a two-source carbon mixing model
  • [x] priors and parameters for priors
  • [x] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [x] priors
  • [x] parameters for priors
  • [x] vignettes for one source
  • [] vignettes for two source
  • [] vignettes for twp source ar

Fixed two source model as it wasn't accurately

estimating $\alpha$ as the formula for $\alpha$

was not part of the model structure, priors,

and parameters.

28-Feb-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [x] a two-source model without different lambda
  • [x] priors for a two-source model without different lambda
  • [x] parameters for priors for a two-source model without different lambda
  • [x] a two-source model with different lambda
  • [x] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [x] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [] a two-source carbon mixing model
  • [] priors and parameters for priors
  • [x] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [x] priors
  • [] parameters for priors
  • [x] vignettes for one source
  • [] vignettes for two source
  • [] vignettes for twp source ar

16-Feb-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [x] a two-source model without different lambda
  • [x] priors for a two-source model without different lambda
  • [x] parameters for priors for a two-source model without different lambda
  • [] a two-source model with different lambda
  • [] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [] a two-source carbon mixing model
  • [] priors and parameters for priors
  • [] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [] priors
  • [] parameters for priors
  • [] vignettes for one source
  • [] vignettes for two source
  • [] vignettes for twp source ar

11-Feb-2025

  • [x] a one-source model
  • [x] priors for a one-source model
  • [x] parameters for priors for a one-source model
  • [] a two-source model without different lambda
  • [] priors for a two-source model without different lambda
  • [] parameters for priors for a two-source model without different lambda
  • [] a two-source model with different lambda
  • [] priors for two-source model w/ different lambda (priors are the same as

a two-source)

  • [] parameters for priors for a two-source model w/ different lambda (priors are the same as a two-source)
  • [] a two-source carbon mixing model
  • [] priors and parameters for priors
  • [] a two-source model with different lambdas and alpha corrected using Heuvel et al. 2024.
  • [] priors
  • [] parameters for priors
  • [] vignettes for one source
  • [] vignettes for two source
  • [] vignettes for twp source at

From NEWS.md in the release

Install

Health

CRAN checks
3ERROR10OK
Check messages
ERRORre-building of vignette outputsr-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64

r-devel-windows-x86_64

Error(s) in re-building vignettes:
--- re-building 'trps.Rmd' using rmarkdown
specified C++17
make cmd is
  make -f "D:/RCompile/recent/R/etc/x64/Makeconf" -f "D:/RCompile/recent/R/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file295607fe056bf.dll" WIN=64 TCLBIN= OBJECTS="file295607fe056bf.o"

make would use
if test "zfile295607fe056bf.o" != "z"; then \
  if test -e "file295607fe056bf-win.def"; then \
    echo g++   -shared  -s -static-libgcc -o file295607fe056bf.dll file295607fe056bf-win.def file295607fe056bf.o  "D:/RCompile/CRANpkg/lib/4.7/rstan/lib/x64/libStanServices.a" -L"D:/RCompile/CRANpkg/lib/4.7/StanHeaders/libs/x64" -lStanHeaders -L"D:/RCompile/CRANpkg/lib/4.7/RcppParallel/lib/x64" -ltbb -LD:/RCompile/CRANpkg/lib/4.7/RcppParallel/libs/x64 -lRcppParallel -LD:/RCompile/CRANpkg/lib/4.7/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"d:/rtools45/x86_64-
...[truncated]...
(expr, envir, ...)
  6.           └─brms (local) .fun(...)
  7.             └─brms (local) .compile_model(model, ...)
  8.               ├─brms:::eval_silent(...)
  9.               │ └─base::eval(expr, envir)
 10.               │   └─base::eval(expr, envir)
 11.               └─brms::do_call(rstan::stan_model, args)
 12.                 └─brms:::eval2(call, envir = args, enclos = envir)
 13.                   └─base::eval(expr, envir, ...)
 14.                     └─base::eval(expr, envir, ...)
 15.                       └─rstan (local) .fun(model_code = .x1)
 16.                         └─rstan:::cxxfunctionplus(...)
 17.                           └─base::sink(type = "output")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'trps.Rmd' failed with diagnostics:
invalid connection
--- failed re-building 'trps.Rmd'

SUMMARY: processing the following file failed:
  'trps.Rmd'

Error: Vignette re-building failed.
Execution halted

r-oldrel-windows-x86_64

Error(s) in re-building vignettes:
--- re-building 'trps.Rmd' using rmarkdown
make cmd is
  make -f "D:/RCompile/recent/R-4.5.3/etc/x64/Makeconf" -f "D:/RCompile/recent/R-4.5.3/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file563f4267d5d6.dll" WIN=64 TCLBIN= OBJECTS="file563f4267d5d6.o"

make would use
if test "zfile563f4267d5d6.o" != "z"; then \
  if test -e "file563f4267d5d6-win.def"; then \
    echo g++  -shared -s -static-libgcc -o file563f4267d5d6.dll file563f4267d5d6-win.def file563f4267d5d6.o  "D:/RCompile/CRANpkg/lib/4.5/rstan/lib/x64/libStanServices.a" -L"D:/RCompile/CRANpkg/lib/4.5/StanHeaders/libs/x64" -lStanHeaders -L"D:/RCompile/CRANpkg/lib/4.5/RcppParallel/lib/x64" -ltbb -LD:/RCompile/CRANpkg/lib/4.5/RcppParallel/libs/x64 -lRcppParallel -LD:/RCompile/CRANpkg/lib/4.5/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"d:/rtools45/x86_64-w64-mingw32.s
...[truncated]...
(expr, envir, ...)
  6.           └─brms (local) .fun(...)
  7.             └─brms (local) .compile_model(model, ...)
  8.               ├─brms:::eval_silent(...)
  9.               │ └─base::eval(expr, envir)
 10.               │   └─base::eval(expr, envir)
 11.               └─brms::do_call(rstan::stan_model, args)
 12.                 └─brms:::eval2(call, envir = args, enclos = envir)
 13.                   └─base::eval(expr, envir, ...)
 14.                     └─base::eval(expr, envir, ...)
 15.                       └─rstan (local) .fun(model_code = .x1)
 16.                         └─rstan:::cxxfunctionplus(...)
 17.                           └─base::sink(type = "output")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'trps.Rmd' failed with diagnostics:
invalid connection
--- failed re-building 'trps.Rmd'

SUMMARY: processing the following file failed:
  'trps.Rmd'

Error: Vignette re-building failed.
Execution halted

r-release-windows-x86_64

Error(s) in re-building vignettes:
--- re-building 'trps.Rmd' using rmarkdown
specified C++17
make cmd is
  make -f "D:/RCompile/recent/R-4.6.1/etc/x64/Makeconf" -f "D:/RCompile/recent/R-4.6.1/share/make/winshlib.mk" CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB="file1a36046f48e0.dll" WIN=64 TCLBIN= OBJECTS="file1a36046f48e0.o"

make would use
if test "zfile1a36046f48e0.o" != "z"; then \
  if test -e "file1a36046f48e0-win.def"; then \
    echo g++   -shared  -s -static-libgcc -o file1a36046f48e0.dll file1a36046f48e0-win.def file1a36046f48e0.o  "D:/RCompile/CRANpkg/lib/4.6/rstan/lib/x64/libStanServices.a" -L"D:/RCompile/CRANpkg/lib/4.6/StanHeaders/libs/x64" -lStanHeaders -L"D:/RCompile/CRANpkg/lib/4.6/RcppParallel/lib/x64" -ltbb -LD:/RCompile/CRANpkg/lib/4.6/RcppParallel/libs/x64 -lRcppParallel -LD:/RCompile/CRANpkg/lib/4.6/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"d:/rtools45/x8
...[truncated]...
(expr, envir, ...)
  6.           └─brms (local) .fun(...)
  7.             └─brms (local) .compile_model(model, ...)
  8.               ├─brms:::eval_silent(...)
  9.               │ └─base::eval(expr, envir)
 10.               │   └─base::eval(expr, envir)
 11.               └─brms::do_call(rstan::stan_model, args)
 12.                 └─brms:::eval2(call, envir = args, enclos = envir)
 13.                   └─base::eval(expr, envir, ...)
 14.                     └─base::eval(expr, envir, ...)
 15.                       └─rstan (local) .fun(model_code = .x1)
 16.                         └─rstan:::cxxfunctionplus(...)
 17.                           └─base::sink(type = "output")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'trps.Rmd' failed with diagnostics:
invalid connection
--- failed re-building 'trps.Rmd'

SUMMARY: processing the following file failed:
  'trps.Rmd'

Error: Vignette re-building failed.
Execution halted

CRAN check page ↗

Slowest check: 5.9 min · r-release-macos-x86_64
Status changes
  • ERROR10 OK, 3 ERRORNow
  • ERROR12 OK, 1 ERROR2026-09-04
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
Show 4 earlier changesHide 4 earlier changes
  • NOTE12 OK, 1 NOTE2026-06-07
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 457 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Help pages
18 (1 internal)includes a package overview page
Examples that run
100%13 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

2.2K
CRAN downloads in the past year
Rank #23,374 · ~6/day · ~179/mo
Daily download trend is not available in this view yet.
18330 days
56090 days
2.2K1 year
Compare downloads with other packages →
Also on68 r2u7 autocran

Repository

0Stars
0Forks
1Open issues
0Open PRs
1Releases
673Commits
2Commit identities
License file reads as CC0-1.0 · 673 commits · Last activity 2025-12-17 · Default branch at 0.1.1, ahead of CRAN 0.1.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
2

Releases over time

2025-03-20 · 12026-07-07 · 1
PracticesBeta

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

Checks run against github.com/benjaminhlina/trps on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2025-12-17 · The repository has a site deploy workflow

pkgdown site last built 2025-12-17

Coverage (1)
Coverage reporting
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
14 external dependencies (excludes base and recommended)

Installing trps adds 72 packages (35 with compiled code, 75 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.1.0 (2025)
Releases (1)
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.0Latest
    2025-03-21 · current release
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2025-03-21
Total releases
1 / 1 yrs
License
CC0
Minimum R
≥ 4.1.0
Bundled data
5.6 KB / 4 files
Download size
723 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("trps")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.1890/0012-9658(2002)083[0703:usitet]2.0.co;2, 10.1890/0012-9658(2002)083[2152:faioba]2.0.co;2, 10.1139/cjfas-2024-0028.

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 trps version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, 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