Description Usage Arguments Details Value Author(s) Examples
This function is used to fit a spline from one of the
basic methods offered through the splinefun
function in the
utils
package. It then calculates segment volumes from the
spline fit.
1 | splineSegVol(segments, method = "mono", ...)
|
segments |
One tree's worth of segment (really readings)
information from a |
method |
One of the methods allowed in |
... |
Any other arguments to be passed to |
The routine was not really written to be used outside of
SplineVolume
, but it can be, and it is a simple way to add
other spline fits to the data frame returned from that routine.
The routine returns a vector of segment volumes. It has length one less than the segment data frame (number of dendrometer readings) passed to it. The order is from base segment to top segment, so it must be reversed and padded with a zero element if one desires to add it to the input data frame.
Jeffrey Gove
1 2 3 4 5 6 7 8 9 | #
# if treesegs is a data frame from SplineVolume...
#
## Not run:
segs = treesegs[treesegs$TreeNo == 1,] #assume TreeNo 1 exists
vol = splineSegVol(segs, 'mono')
segs[,'monoVol'] = c(rev(vol), 0.0) #pad initial reading
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.