View source: R/nm-gettersetters.R
simple_field | R Documentation |
simple_field(m, ...)
m |
An nm object. |
... |
Arguments to get/set fields. |
If ...
contains an assignment, an nm object with modified field,
otherwise returns the field value.
# 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 %>% simple_field(stars = 3)
m1 %>% simple_field(stars)
m1 ## see that stars is a field of the nm object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.