splineSegVol: Fit a spline and calculate segment volumes

Description Usage Arguments Details Value Author(s) Examples

Description

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.

Usage

1
splineSegVol(segments, method = "mono", ...)

Arguments

segments

One tree's worth of segment (really readings) information from a segments data frame generated from SplineVolume. Note that this should be a data frame in the same format.

method

One of the methods allowed in spline and splinefun.

...

Any other arguments to be passed to splinefun.

Details

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.

Value

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.

Author(s)

Jeffrey Gove

Examples

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)

Dendrometry documentation built on May 2, 2019, 5:47 p.m.