Description Usage Arguments Details Value Author(s) See Also Examples
This routine will allow the generation of a collection of
synthetic standing tree attributes in a
data.frame
. Note that the function returns a collection
of tree attributes in the sense of dimensions, etc., and not a
collection of standingTree
objects, although it can be
used to generate one if desired (see examples). Please see “The
Stem Class” vignette for more details.
1 2 3 4 5 6 7 8 9 10 |
nTrees |
The number of trees in the collection. |
dbhs |
A length-two vector specifying the range of breast height diameters from which to uniformly draw the sample. |
topDiams |
A length-two vector specifying the range of
top diameters, in the form of a proportion of
the |
heights |
A length-two vector specifying the range of tree heights from which to uniformly draw the sample. |
solidTypes |
A length-two vector specifying the range in the tree shape parameter for the default taper and volume equations; where: 1-2 is a neiloid, 2 is a cone, and >2 is a paraboloid. |
species |
A character vector of possible species from which to draw the sample uniformly. This can be any legal character string, and so can include codes, names, Latin names, etc. |
sampleRect |
A rectangle delineating the area within which the
tree centers (pith at dbh) will be sampled from. It must be in
the form of a valid |
startSeed |
A numeric start seed for the random number
generator. |
runQuiet |
|
... |
Not used at present, just gobbles up other arguments. |
This routine does not care about units, it is up to the
user to make sure that the ranges for diameters and heights are
reasonable for whatever system (i.e., "English" or "metric") one is
working in. For example, if metric units are used, dbhs
would be in centimeters, while heights
would be in meters.
A data frame with columns: species, height, dbh, topDiam,
solidType, x, y
where x,y
is the center point of the tree pith
at dbh
.
Jeffrey H. Gove
1 2 3 4 5 6 7 8 9 10 11 12 | #
# draw from a unit square (metric default)...
#
sampleTrees(species=c('ewp','sm','978'),dbhs=c(4,10), heights=c(3,6))
#
# draw from a buffer...
#
bufftr = bufferedTract(10, Tract(c(x=50,y=50),cellSize=0.5))
st = sampleTrees(10, sampleRect=bufftr@bufferRect, dbhs=c(20,40))
strees = standingTrees(st)
plot(bufftr, axes=TRUE, gridColor='grey80')
plot(strees, add=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.