## calculating bark thickness depends on diameter estimation and hence on the
## assumed residual variance at calibration.
## can be Rfn=list(fn="sig2") (default), i.e. EBLUP estimation from taper curve
## or e.g. Rfn=list(fn="zero"), i.e. force taper curve through the given measurements
options("TapeS_Rfn") # "sig2", default in TapeS
tmp <- tprTrees()
Dm(tmp); Hm(tmp) # Dbh = D(Hx=1.3) = 30cm (measured)
Dbh(tmp) # estimated via EBLUP from taper curve
tprBark(tmp, Hx = c(1.3, 5)) # bark thickness corresponds to Dbh(tmp)
(d <- tprDiameter(tmp, Hx = c(1.3, 5), bark=TRUE)) ## predicted
bark(1, d[1], 1.3/30) # the same!
bark(1, d[2], 5/30) # the same!
## if using option TapeS_Rfn = list(fn="zero"), force taper curve through measurements
setTapeSoptions(Rfn = list(fn="zero"))
options()$TapeS_Rfn
tprBark(tmp, Hx = c(1.3, 5))
bark(1, 30, 1.3/30) # the same but different to above
bark(1, d[1], 1.3/30) # cf. above
bark(1, 28, 5/30) # the same but different to above
bark(1, d[2], 1.3/30) # cf. above
Run the code above in your browser using DataLab