ignore: Get/set ignore statement from control file contents

View source: R/input_data.R

ignoreR Documentation

Get/set ignore statement from control file contents

Description

[Stable]

Usage

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.

See Also

data_ignore_char(), data_filter_char()

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
m1 %>% dollar("DATA")

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

m1 %>% dollar("DATA")


tsahota/NMproject documentation built on Oct. 1, 2022, 11:51 a.m.