stemMapping | R Documentation |
The function is to map all the stems in a plot based on bearing and distance.
stemMapping(
objectID,
bearing,
distance,
plotShape = as.character(NA),
plotSize,
distanceUnit = "m",
outputFormat,
showID = TRUE
)
objectID |
character, A object's ID, e.g., a tree's ID. |
bearing |
numeric, Azimuth of a object from the north. It should be between 0 to 360. |
distance |
numeric, Distance between a object and the centre of the circle. |
plotShape |
character, circle, Rectangle or NA. NA means no plot shape information is not available and and no plot geometry will be produced. |
plotSize |
numeric, Defines the plot geoimetry. If plotShape is circular, a number must be provided as plot radius. If plotShape is rectangle, two numbers must be provided to determine length and width of a plot. |
distanceUnit |
character, Defines the unit in the stem mapping. Default is |
outputFormat |
character, Defines whether a |
showID |
logical, Specifies whether the objectID will be showed in outputed figure. Default is |
A table contains the x and y for all the objects and the plot boundary. 2) a ggplot object will be returned for visualization.
In the figure, IPC is the integrated plot center with x = 0 and y = 0.
Yong Luo
## Not run:
## randomly generate some trees
bigplottrees <- data.table(tree_id = 1:20,
angle = runif(20, min = 0, max = 360),
distance = runif(20, min = 0, max = 11.28))
## output a table
stemmapped_table <- stemMapping(objectID = bigplottrees$tree_id,
bearing = bigplottrees$angle,
distance = bigplottrees$distance,
plotShape = "circle",
plotSize = 11.28,
distanceUnit = "m",
outputFormat = "table")
## output a figure
stemmapped_figure <- stemMapping(objectID = bigplottrees$tree_id,
bearing = bigplottrees$angle,
distance = bigplottrees$distance,
plotShape = "circle",
plotSize = 11.28,
distanceUnit = "m",
outputFormat = "figure",
showID = TRUE)
## output a figure without a plot
stemmapped_figure <- stemMapping(objectID = bigplottrees$tree_id,
bearing = bigplottrees$angle,
distance = bigplottrees$distance,
outputFormat = "figure",
showID = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.