[Stable]

ignore(ctl, ignore_char)

Arguments

ctl

An nm object.

ignore_char

Optional character. Ignore statement to set in $DATA.

Value

If ignore_char is specified returns an nm object with modified ctl_contents field. If no IGNORE present, returns FALSE. Otherwise returns the value of the IGNORE statement in $DATA.

Examples


# 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")) %>%
  fill_input()


ignore(m1) ## display ignore statement, currently none
#> [1] "FALSE"
m1 %>% dollar("DATA")
#> $`execute.Models/m1`
#>   1| $DATA ../../../../../../../../../../Users/runner/work/_temp/Library/NMproject/extdata/examples/theopp/SourceData/THEOPP.csv IGNORE=@
#> 

m1 <- m1 %>% ignore("ID > 10") ## changes ignore to ignore IDs > 10.

m1 %>% dollar("DATA")
#> $`execute.Models/m1`
#>   1| $DATA ../../../../../../../../../../Users/runner/work/_temp/Library/NMproject/extdata/examples/theopp/SourceData/THEOPP.csv IGNORE=@
#>   2| IGNORE=(ID.GT.10)
#>   3| 
#>