Skip to content

'R' Bindings for 'TMB'

16packages dependsuggested by 1
50.1Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Native 'R' interface to 'TMB' (Template Model Builder) so models can be written entirely in 'R' rather than 'C++'. Automatic differentiation, to any order, is available for a rich subset of 'R' features, including linear algebra for dense and sparse matrices, complex arithmetic, Fast Fourier Transform, probability distributions and special functions. 'RTMB' provides easy access to model fitting and validation following the principles of Kristensen, K., Nielsen, A., Berg, C. W., Skaug, H., & Bell, B. M. (2016) DOI:10.18637/jss.v070.i05 and Thygesen, U.H., Albertsen, C.M., Berg, C.W. et al. (2017) DOI:10.1007/s10651-017-0372-4.

Changes in 2.0
  • Print and store TMB version on install.
  • Interface to combinom special functions.
  • Fix ADjoint() when user function calls oher tape (#91).
  • Fix subtle bug caused by lazy evaluation inside MakeTape() (#90).
  • Change dnorm order as in TMB (github.com/glmmTMB/glmmRTMB/issues/4).
  • Add experimental obj$vectorize().
  • Add dflat().
  • dautoreg() fixes:
  • Speedup construction of stationary variance.
  • Fix simulation code (only worked for length(phi)==1).
  • Add atan2() (#82).

From NEWS in the release

Install

Health

CRAN checks
13OK
Slowest check: 22.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-09-08
  • ERROR12 OK, 1 ERROR2026-09-07
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-22
Show 5 earlier changesHide 5 earlier changes
  • ERROR11 OK, 1 ERROR2026-04-25
  • WARNING11 OK, 3 WARNING2026-04-22
  • ERROR10 OK, 3 WARNING, 1 ERROR2026-04-18
  • WARNING11 OK, 3 WARNING2026-03-25
  • ERROR5 OK, 3 NOTE, 6 ERROR2026-03-10
Advisories

none known

Documentation

In release 2.0
READMENoVignettesYes · 3 · dynamicNEWSYes · 33% structured · mentions 2.0Citation fileNoWebsitenot declared in DESCRIPTION
Description cites a JSS article
Help pages
21includes a package overview page
Examples that run
100%18 run in a plain check
Exported functions with examples
100%
Documented parameters
87%
Return-value docs
93%
Help pages citing references
5%

Downloads

50.1K
CRAN downloads in the past year
Rank #1,038 · ~137/day · ~4.2K/mo
Daily download trend is not available in this view yet.
34K30 days
37.1K90 days
50.1K1 year
Compare downloads with other packages →
Also on1K r2u12 autocran

Repository

84Stars
12Forks
5Open issues
1Open PRs
0Releases
794Commits
7Commit identities
794 commits · Last activity 2026-10-02 · +2.4% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
82%
Median days to close, 50 most recently updated closed issues
4
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-10-19 · 712026-09-28 · 84
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/kaskr/rtmb on 2026-10-18.

Reproducibility and dev environment (1)
Makefile
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing RTMB adds 3 packages (3 with compiled code, 4.2 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppEigen 1.7 MB, TMB 763 KB.

Depends (0)
none
Imports (5)
RcppMatrixmethodsTMBMASS
LinkingTo (3)
Enhances (0)
none
Reverse dependencies
16direct
27indirect
Depends 5 · Imports 11
Suggested by 1
Show all 17 packagesHide all 17 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 1.2 (2023)
Releases (9)

Pick two releases to compare their code metrics.

  • 2.0Latest
    record
    2026-09-17 · current release · diff ↗ ·
    added 2 exports
    atan2, dflat
  • R
    R 4.6.0 released · 2026-04-24
  • 1.9
    record
    2026-03-20 · diff ↗ ·
    added 7 exports
    dchisq, integrate, pchisq, qchisq, uniroot, Vectorize, order
  • 1.8
    record
    2025-10-14 · diff ↗ ·
    added 5 exports
    lbeta, dcauchy, pnbinom, sort, findInterval
  • R
    R 4.5.0 released · 2025-04-11
  • 1.7
    record
    2025-01-10 · diff ↗ ·
    added 2 exports
    logspace_add, logspace_sub
  • 1.6
    record
    2024-09-11 · diff ↗ ·
    removed 1 export
    outer
    added 3 exports
    AD, eigen, svd
  • R
    R 4.4.0 released · 2024-04-24
  • 1.5
    record
    2024-04-23 · diff ↗ ·
    added 3 exports
    ADjoint, cov2cor, dlnorm
  • 1.4
    record
    2023-12-01 · diff ↗ ·
    added 3 exports
    interpol1Dfun, interpol2Dfun, splinefun
  • 1.3
    record
    2023-10-13 · diff ↗ ·
    removed 2 exports
    crossprod, tcrossprod
  • 1.2
    record
    2023-08-10
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-08-10
Total releases
9 / 3 yrs
License
GPL (>= 2) OSI
Download size
669 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("RTMB")
Kristensen, K. (2026). RTMB: 'R' Bindings for 'TMB' (Version 2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.RTMB

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

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