RipUvK: Ripleys K using splancs.

Description Usage Arguments Examples

Description

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.

Usage

1
2
3
RipUvK(splitdata, plotdim = c(1000, 500), rseq = c(5, 10, 20, 30, 40,
  50), mindbh = 10, xcol = "gx", ycol = "gy", debug = FALSE,
  show = FALSE)

Arguments

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 mindbh are excluded. If NULL, all living trees are included.

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.

Examples

 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)

forestgeo/ctfs documentation built on May 3, 2019, 6:44 p.m.