simple_field: Interface for getting and setting your own simple fields in...

Description Usage Arguments Value Examples

View source: R/nm-gettersetters.R

Description

[Stable]

Usage

1

Arguments

m

An nm object.

...

Arguments to get/set fields.

Value

If ... contains an assignment, an nm object with modified field, otherwise returns the field value.

Examples

1
2
3
4
5
6
7
8
9
# 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.

NMproject documentation built on Sept. 5, 2021, 5:43 p.m.