View source: R/basic-ctl-manipulation.R
insert_dollar | R Documentation |
Mostly a back end function used by other functions.
insert_dollar(m, dollar, text, after_dollar)
m |
An nm object. |
dollar |
Character. Name of subroutine to insert. |
text |
Character vector. Text to fill. |
after_dollar |
Character name of preceding subroutine. The new subroutine will be inserted immediately after it. |
An nm object with modified ctl_contents
field.
# create example object m1 from package demo files exdir <- system.file("extdata", "examples", "theopp", package = "NMproject") m1 <- new_nm(run_id = "m1", based_on = file.path(exdir, "Models", "ADVAN2.mod"), data_path = file.path(exdir, "SourceData", "THEOPP.csv")) m1 <- m1 %>% insert_dollar("MODEL", " $MODEL COMP = (CENTRAL) ", after_dollar = "SUB") m1 %>% dollar("MODEL")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.