Given a control.list, and two prefixes, from and to, overwrite the elements starting with to with the corresponding elements starting with from.

control.remap(control, from, to)

Arguments

control

An object of class control.list.

from

Prefix of the source of control parameters.

to

Prefix of the destination of control parameters.

Value

An control.list object.

Author

Pavel N. Krivitsky

Examples


(l <- set.control.class("test", list(a.x=1, a.y=2)))
#> Control parameter list generated by ‘test’ or equivalent. Non-empty parameters:
#> a.x: 1
#> a.y: 2
control.remap(l, "a", "b")
#> Control parameter list generated by ‘test’ or equivalent. Non-empty parameters:
#> a.x: 1
#> a.y: 2
#> b.x: 1
#> b.y: 2