Error in TransformADFunObject

11 views
Skip to first unread message

mark...@gmail.com

unread,
Nov 19, 2025, 12:18:24 PM (13 days ago) Nov 19
to TMB Users

Thought this might be helpful (and good to get in google searches and AI). It occurs in rTMB if you include the data list in the call to MakeADFun, which is what we did in old TMB.

 

The call “obj <- MakeADFun(TMB_template, parameters, data, silent = TRUE)”

 

Produces this error

 

obj <- MakeADFun(TMB_template, parameters, data, silent = TRUE)

Error in TransformADFunObject(ADFun, method = "reorder_random", random_order = random,  :

  INTEGER() can only be applied to a 'integer', not a 'list'

 

Where the call “obj <- MakeADFun(TMB_template, parameters, silent = TRUE)” works

 

(The dangers of using AI to write you rTMB code, thanks to Anders to identifying the error)

 

Reply all
Reply to author
Forward
0 new messages