Skip to content

Print line numbers #966

Closed
Closed
@sbfnk

Description

@sbfnk

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions