Description Usage Arguments Examples
Ripley's K using splancs. Computes the univariate Ripley's K for a list of species (all species at a site is the default). Also calculates the O-ring statistic, or density (per area) of conspecifics in a series of annuli defined by rseq, and the omega statistic, which is O-ring divided by overall density.
Works through all the elements of a split datafile, each of which must have gx, gy coordinates, a status code, and dbh. This would usually be species, but could be any other division of the data. RipUvK always performs calculations on each element of the splitdata list submitted.
If the data have no status field, all records are included. If there is a status field, only "A" values are included. If mindbh is set to 0, all records are included and no dbh field is consulted. But if mindbh is set, there must be a dbh field, and records are excluded if smaller.
The output is a list of 5 components.
K is the Ripley's K object produced by the khat function in the splancs package; please see help for that package for details.
O is the mean density of neighbors in each successive distance interval; it is a list of vectors, one per species, each vector of length matching length of rseq.
omega is the omega-statistic, or O in each successive distance interval divided the plot-wide density; density is expressed per 10,000 square distance units, which means per hectare if units are meters.
abund is a vector of species abundances, including individuals used in the calculation.
midpts is a vector of the same length as rseq, giving the midpoint of each distance interval, for graphing purposes.
1 2 3 |
splitdata |
A complete CTFS plot dataset comprised of a list, each element having a dataframe for one species. There must be columns for x and y coordinates; the names of those two columns are passed as arguments (default is the CTFS standard gx, gy). |
plotdim |
The x and y dimensions of the plot. |
rseq |
The distances defining intervals in which Ripley's statistic is calculated. |
mindbh |
The minimum diameter above which the counts are done. Trees
smaller than |
xcol, ycol |
The names of the columns holding x and y coordinates. |
debug |
Logical. If TRUE, call browser to debug. |
show |
creates a graph to show one omega value for each species, as a way to track progress. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
# If a split database has been created by split_data and stored, CTFSplot
will load it.
CTFSplot("bci",6,type="split")
# Otherwise start with a standard R Analytical Table (could be stem also):
CTFSplot("bci",6,type="full")
split6=split_data(bciex::bci12t6mini)
# A quick test, run on only the first 10 species:
rip = RipUvK(
splitdata = split6[1:10],
plotdim = c(1000, 500),
rseq = c(10, 20, 30, 40, 50, 60),
mindbh = 10,
xcol = "gx",
ycol = "gy"
)
# All the species (takes several minutes):
rip = RipUvK(
splitdata = split6,
plotdim = c(1000, 500),
rseq = c(10, 20, 30, 40, 50, 60),
mindbh = 10,
xcol = "gx",
ycol = "gy"
)
str(rip$K[[1]])
plot(rip$midpts,rip$omega[2,],ylim=c(0,10))
# calculate K and the (number of conspecific) individuals for each tree within
# distances of rseq
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.