# NOT RUN {
# Averaged thermal conductivity of pipe insulation at 110 <U+00B0>C
print(m278insdata)
head(m278inshcm(110, m278insdata[["material"]]))
# [1] 0.09600 0.07525 0.14950 0.14325 0.14950 0.10800
# Terms for linear connection between thermal conductivity of unknown
# (averaged) pipe insulator vs temperature:
temperature <- as.double(1:450)
lambda_ins <- with(m278insdata, {
vapply(temperature, function(x) mean(m278inshcm(x, material)), .1)
})
C <- coef(lsfit(temperature, lambda_ins)) # c(Intercept, X)
stopifnot(
all(abs(C - c(7.963590e-02, 9.730769e-05)) < 1e-8)
)
# }
Run the code above in your browser using DataLab