modelparse: Parse model specification text

View source: R/modspec.R

modelparseR Documentation

Parse model specification text

Description

Parse model specification text

Usage

modelparse(
  txt,
  split = FALSE,
  drop_blank = TRUE,
  comment_re = c("//", "##"),
  keep_mapping = FALSE
)

modelparse_rmd(txt, split = FALSE, drop_blank = TRUE, comment_re = "//")

Arguments

txt

model specification text.

split

logical; if TRUE, txt will be split on ⁠\n⁠ before processing.

drop_blank

logical; TRUE if blank lines will be dropped.

comment_re

regular expression to identify comments.

keep_mapping

if TRUE, parse information will be retained as attributes on the parsed model code.

See Also

modelsplit() and modelunsplit() for a non-destructive split/reassemble alternative.

Examples

file <- file.path(modlib(), "pk1.cpp")

code <- readLines(file)

modelparse(code)


mrgsolve documentation built on May 20, 2026, 9:06 a.m.