Description
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>.
Downloads
1.8K
Last 30 days
2945th
4K
Last 90 days
14.2K
Last year
Trend: +71.4% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | WARNING |
| r-oldrel-macos-x86_64 | WARNING |
| r-oldrel-windows-x86_64 | WARNING |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (6 non-OK)
for code/documentation mismatches
Codoc mismatches from Rd file 'ADvector.Rd':
\S4method{findInterval}{advector,advector}
Code: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE)
Docs: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE, checkSorted = TRUE, checkNA = TRUE)
Argument names in docs not in code:
checkSorted checkNA
installed package size
installed size is 134.1Mb
sub-directories of 1Mb or more:
R 2.1Mb
libs 131.1Mb
for code/documentation mismatches
Codoc mismatches from Rd file 'ADvector.Rd':
\S4method{findInterval}{advector,advector}
Code: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE)
Docs: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE, checkSorted = TRUE, checkNA = TRUE)
Argument names in docs not in code:
checkSorted checkNA
installed package size
installed size is 136.9Mb
sub-directories of 1Mb or more:
R 2.0Mb
libs 133.8Mb
for code/documentation mismatches
Codoc mismatches from Rd file 'ADvector.Rd':
\S4method{findInterval}{advector,advector}
Code: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE)
Docs: function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
left.open = FALSE, checkSorted = TRUE, checkNA = TRUE)
Argument names in docs not in code:
checkSorted checkNA
installed package size
installed size is 10.7Mb
sub-directories of 1Mb or more:
R 1.2Mb
libs 8.5Mb
Check History
WARNING 11 OK · 0 NOTE · 3 WARNING · 0 ERROR · 0 FAILURE Mar 24, 2026
installed package size
installed size is 134.1Mb
sub-directories of 1Mb or more:
R 2.1Mb
libs 131.1Mb
installed package size
installed size is 136.9Mb
sub-directories of 1Mb or more:
R 2.0Mb
libs 133.8Mb
installed package size
installed size is 10.7Mb
sub-directories of 1Mb or more:
R 1.2Mb
libs 8.5Mb
ERROR 5 OK · 3 NOTE · 0 WARNING · 6 ERROR · 0 FAILURE Mar 10, 2026
examples
Running examples in ‘RTMB-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: OSA-residuals
> ### Title: Recursive quantile residuals
> ### Aliases: OSA-residuals oneStepPredict [.osa
...[truncated]...
meters=list(rw=rep(0,20), sd=1),
+ random="rw")
Error in advector(e2) :
Invalid argument to 'advector' (lost class attribute?)
Calls: MakeADFun ... diff.advector -> diff_patch -> Ops.advector -> Arith2 -> advector
Execution halted
examples
Running examples in ‘RTMB-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: OSA-residuals
> ### Title: Recursive quantile residuals
> ### Aliases: OSA-residuals oneStepPredict [.osa
...[truncated]...
meters=list(rw=rep(0,20), sd=1),
+ random="rw")
Error in advector(e2) :
Invalid argument to 'advector' (lost class attribute?)
Calls: MakeADFun ... diff.advector -> diff_patch -> Ops.advector -> Arith2 -> advector
Execution halted
examples
Running examples in ‘RTMB-Ex.R’ failed The error most likely occurred in: > ### Name: OSA-residuals > ### Title: Recursive quantile residuals > ### Aliases: OSA-residuals oneStepPredict [.osa length.osa dim.osa > ### is.array.osa is.matrix.osa > ...[truncated]... meters=list(rw=rep(0,20), sd=1), + random="rw") Error in advector(e2) : Invalid argument to 'advector' (lost class attribute?) Calls: MakeADFun ... diff.advector -> diff_patch -> Ops.advector -> Arith2 -> advector Execution halted
examples
Running examples in ‘RTMB-Ex.R’ failed The error most likely occurred in: > ### Name: OSA-residuals > ### Title: Recursive quantile residuals > ### Aliases: OSA-residuals oneStepPredict [.osa length.osa dim.osa > ### is.array.osa is.matrix.osa > ...[truncated]... meters=list(rw=rep(0,20), sd=1), + random="rw") Error in advector(e2) : Invalid argument to 'advector' (lost class attribute?) Calls: MakeADFun ... diff.advector -> diff_patch -> Ops.advector -> Arith2 -> advector Execution halted
tests
Running ‘tinytest.R’ [0s/1s]
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly=TRUE)) {
+ tinytest::test_package("RTMB", ncpu=getOption("Ncpus", 1))
+ }
starting worker pid=56958 o
...[truncated]...
e) parallel:::.slaveRSOCK)()
An irrecoverable exception occurred. R is aborting now ...
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... FUN -> recvData -> recvData.SOCKnode -> unserialize
Execution halted
examples
Running examples in 'RTMB-Ex.R' failed The error most likely occurred in: > ### Name: OSA-residuals > ### Title: Recursive quantile residuals > ### Aliases: OSA-residuals oneStepPredict [.osa length.osa dim.osa > ### is.array.osa is.matrix.osa > ...[truncated]... meters=list(rw=rep(0,20), sd=1), + random="rw") Error in advector(e2) : Invalid argument to 'advector' (lost class attribute?) Calls: MakeADFun ... diff.advector -> diff_patch -> Ops.advector -> Arith2 -> advector Execution halted
installed package size
installed size is 128.2Mb
sub-directories of 1Mb or more:
R 2.0Mb
libs 125.3Mb
installed package size
installed size is 129.0Mb
sub-directories of 1Mb or more:
R 2.0Mb
libs 126.1Mb
installed package size
installed size is 10.3Mb
sub-directories of 1Mb or more:
R 1.1Mb
libs 8.3Mb