Skip to contents

Show generated code from compiling an odin model.

Usage

odin_show(expr, input_type = NULL, compatibility = "warning")

Arguments

expr

Odin code as the path to a file (a string), a character vector of code, or as an expression (typically within braces {}).

input_type

An optional string describing the type of input for expr - must be one of file, text or expression. If given, this skips the type detection logic and odin will throw an error if the wrong type of input is given. Using this may be beneficial in programmatic environments.

compatibility

Compatibility mode to use. Valid options are "warning", which updates code that can be fixed, with warnings, and "error", which will error. The option "silent" will silently rewrite code, but this is not recommended for general use as eventually the compatibility mode will be removed (this option is primarily intended for comparing output of odin1 and odin2 models against old code).

Value

A character vector, with class odin_code that has a pretty-print method defined.