Description Usage Arguments Value Examples
This function finds the individual adult trees within "m" distance of each seedling subplot in seedPlots. seedPlots and adults are both data.frames, and m is the search distance.
1 | findAdultTrees(seedPlots, adults, m)
|
seedPlots |
A data.frame containing "x", "y" and "n", the geographic location of seedling plots and the number of seedlings contained within those plots. |
adults |
A data.frame containing "x", "y" and "dbh" of adult trees in the plot, along with a unique identifier "treeid". |
m |
The search radius, from the center of the seedling Plot. This does not take into account the previous "m" for seedling subplots that were generated. |
This function returns a data.frame with "treeid", "ri", "m" and "dbh". "ri" is the number of seedlings in the subplot that was "m" distance from the tree labeled "treeid" with a "dbh".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #' ## make a sample seed data.frame by subsetting the included
## expandedTrees data.frame..
sampleseeds <- expandedTrees[expandedTrees$plot=="trinity" &
expandedTrees$measyear==2001 &
expandedTrees$stage=="seedling" &
expandedTrees$species=="ABCO",]
## get subplots
seedlingPlots <- findSeedPlots(sampleseeds, 1)
## get adult trees
sampleadults <- expandedTrees[expandedTrees$plot=="trinity" &
expandedTrees$measyear==2001 &
expandedTrees$stage=="tree" &
expandedTrees$species=="ABCO",]
## run function
adults <- findAdultTrees(seedlingPlots, sampleadults, 20)
## look at data
head(adults)
nrow(adults)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.