Copy Model Parameters from one Stratum to another
Arguments
- calibration
calibration object as returned by
runGompitzCalibration
- from
name of stratum to copy parameters from
- to
vector of names of strata to which parameters are to be copied to. If not given, the parameters of
from
are copied to all strata for which model parameters did not converge.- dbg
if
TRUE
(default) debug messages are shown
Examples
if (FALSE) {
# Get an example calibration
calibration <- kwbGompitz::exampleCalibration()
# Check for which strata the model parameters converged
checkConvergence(calibration, do.warn = FALSE)
# Copy parameters from a stratum for which the model parameters converged
# to a stratum for which the model parameters did not converge
calibration <- copyParameters(calibration, from = "Cast Iron", to = "Concrete")
# Check again
checkConvergence(calibration, do.warn = FALSE)
# The following gives a warning (no convergence for source stratum) and returns
# the calibration unchanged
calibration <- copyParameters(calibration, "Clay", "Brick")
# The following gives a warning (differing distinct condition classes) and
# returns the calibration unchanged
calibration <- copyParameters(calibration, "Cast Iron", "Brick")
}