Skip to content

kaskr/RTMB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTMB - R bindings for TMB

cran version

Description

The package RTMB provides a native R interface for a substantial subset of TMB so you can avoid coding in C++.

RTMB only affects the TMB function MakeADFun that builds the objective function. Once MakeADFun has been invoked, everything else is exactly the same and models run as fast as if coded in C++.

PROS:

  • Fast to change and re-run models because no compilation is needed.
  • Debugging can be performed using the normal R debugger rather than gdb.
  • Most common TMB features are supported. See current list of working examples.
  • Simplified interface can automatically simulate from the model and calculate OSA residuals.

More information, including vignettes (introduction / advanced) and documentation, can be found on the RTMB universe page.

Install

CRAN version

install.packages('RTMB')

Development version (Rtools/compiler not needed)

install.packages('RTMB', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))

Experimental parallel version available as a separate package 'RTMBp'

install.packages('RTMBp', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))

Source

NOTE: Requires at least TMB-1.9.7.

remotes::install_github("https://github.com/kaskr/RTMB", subdir="RTMB")

Test the package

tinytest::test_package("RTMB")

runs the tests.

Known issues

  • If you get a segfault while installing the package, please re-install Rcpp from source and try again (see #5).