insert_lines.Rd
Inserts one or more lines into a libbi model. If one of before
or
after
is given, the line(s) will be inserted before or after a given
line number or block name, respectively. If one of at_beginning of
or at_end_of
is given, the lines will be inserted at the
beginning/end of the block, respectively.
insert_lines(x, lines, before, after, at_beginning_of, at_end_of)
a stanedit
object
vector or line(s)
line number before which to insert line(s)
line number after which to insert line(s)
block at the beginning of which to insert lines(s)
block at the end of which to insert lines(s)
the updated stanedit
object
model_file_name <- system.file(package = "stanedit", "regression.stan")
reg <- stanedit(filename = model_file_name)
insert_lines(reg, lines = "alpha ~ std_normal();", after = 12)
#> data {