Mainly used to associate a dataset with an nm object. Requires ctl_contents to already be specified.
data_path(m, text)
An nm object.
Optional character. Path to input dataset.
if text is not specified, will return the data_path
name
otherwise will return an nm object with modified data_path
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"))
data_path(m1) ## display data name
#> [1] "/Users/runner/work/_temp/Library/NMproject/extdata/examples/theopp/SourceData/THEOPP.csv"