See ParameterSet for full details.

pset(..., prms = list(...), tag_properties = NULL, deps = NULL, trafo = NULL)

Arguments

...

(prm)
prm objects.

prms

(list())
List of prm objects.

tag_properties

(list())
List of tag properties. Currently supported properties are: i) 'required' - parameters with this tag property must be non-NULL; ii) 'linked' - only one parameter in a linked tag group can be non-NULL and the others should be NULL, this only makes sense with an associated trafo; iii) 'unique' - parameters with this tag must have no duplicated elements, only makes sense for vector parameters; iv) 'immutable' - parameters with this tag cannot be updated after construction.

deps

(list())
List of lists where each element is passed to $add_dep. See examples.

trafo

(function())
Passed to $trafo. See examples.

Examples

library(set6)

# simple example
prms <- list(
 prm("a", Set$new(1), 1, tags = "t1"),
 prm("b", "reals", 1.5, tags = "t1"),
 prm("d", "reals", 2, tags = "t2")
)
p <- pset(prms = prms)

# with properties, deps, trafo
p <- pset(
 prm("a", Set$new(1), 1, tags = "t1"),
 prm("b", "reals", 1.5, tags = "t1"),
 prm("d", "reals", 2, tags = "t2"),
 tag_properties = list(required = "t2"),
 deps = list(
   list(id = "a", on = "b", cond = cnd("eq", 1.5))
 ),
 trafo = function(x, self) return(x)
)