Create objects for representing names and labels in a dynamical model.
Usage
StringDataFromFrame(data)
StringDataFromDotted(labels, name)
# S3 method for class 'StringData'
print(x, ...)
Functions
StringDataFromFrame()
: Construct object from a data frame without any dots in either the names or the values.StringDataFromDotted()
: Construct object from a character scalar with (dot-separated) partition names and a character vector with (dot-separated) partition labels.
Examples
vars = (mp_cartesian(
mp_index(Epi = c("S", "I", "R"))
, mp_index(Age = c("young", "old"))
)
|> as.data.frame()
|> StringDataFromFrame()
)
vars
#> String data object with the following $frame():
#> Epi Age
#> 1 S young
#> 2 I young
#> 3 R young
#> 4 S old
#> 5 I old
#> 6 R old
vars$dot()
#> String data object with the following $frame():
#> Epi.Age
#> 1 S.young
#> 2 I.young
#> 3 R.young
#> 4 S.old
#> 5 I.old
#> 6 R.old