Closed
Description
Is your feature request related to a problem? Please describe.
Diagnosing issues in stan models often requires identifying the offending line, which is reported back by stan. There is currently no straightforward way to do this in a <CmdStanModel>
object (update: it can be done using $code()[line_number]
).
Describe the solution you'd like
A print method that prints line numbers (either optionally or always).
Describe alternatives you've considered
Users could implement their own routines for doing this, or locate line numbers in the corresponding file (potentially after a call to write_stan_file()
.