In contrast to the $rep
method in ParameterSet, this method
deep clones the ParameterSet and returns a new object.
# S3 method for ParameterSet
rep(x, times, prefix, ...)
(integer(1)
)
Numer of times to replicate the ParameterSet
.
(character(1)|character(length(times))
)
The prefix to add to ids and linked tags. If length 1
then is
internally coerced to paste0(prefix, seq(times))
, otherwise the length
should be equal to times
.
(ANY
)
Other arguments, currently unused.
In order to avoid duplicated parameter ids, every id in the
ParameterSet is given a prefix
in the format prefix__id
. In
addition, linked tags are also given the same prefix to prevent
incorrectly linking parameters.
The primary use-case of this method is to treat the ParameterSet as a collection of identical ParameterSet objects.