Description Usage Arguments Details Value Note Author(s) References See Also Examples

This function computes competition indices based on pairs of plants, ignoring higher-order interactions.

1 2 |

`plants` |
A spatstat point pattern object (class |

`maxN` |
Maximum number of nearest neighbors to include as potential competitors. Default is NULL (no restriction). |

`maxR` |
Maximum radius to search for potential competitors. Default is NULL (no restriction). |

`select` |
Optional user-supplied selection function for choosing competitors. Must take arguments |

`selpar` |
Parameter(s) for |

`kernel` |
Competition kernel function for computing the effect of competitor |

`kerpar` |
Parameter(s) for |

Traditionally, the competition index for a subject plant *i* is obtained in two stages: (1) Choose a set of competitors of *i* by some selection rule. (2) Compute a measure of the effect of each competitor *j* on plant *i*, and add over *j*. This effect of *j* on *i* is normally a function of the sizes of both plants and of the distance between them, which we call a competition kernel. The kernel may depend on other plant attributes, like species, and in some rare instances on the distance ranks or on the number of competitors. Conceptually, the first stage is not strictly necessary, it could be replaced by specifying zero kernel values (the effect of the selection is usually to truncate the kernel function beyond some distance). However, a separate selection rule may be more transparent, and may reduce the computational effort in searching for neighbors.

Some simple selection rules can be implemented by giving a value to `maxN`

and/or `maxR`

. In any case, reasonable limits on these variables may be advisable for reducing computation.

More complex rules can be specified by the `select`

function, with parameters in `selpar`

. See `select`

for examples. If more than one of `maxN`

, `maxR`

or `select`

are given, the intersection of the selection criteria is used.

Kernel computation is specified by the `kernel`

function and the parameters in `kerpar`

. See `kernel`

for examples.

Returns the input point pattern `plants`

, with the marks replaced by a data frame containing the original marks followed by the competition index in a column named `cindex`

.

Requires the spatstat package.

Oscar García.

https://github.com/ogarciav/siplab

García, O. “Siplab, a spatial individual-based plant modelling system”. Computational Ecology and Software 4(4), 215-222. 2014.

1 2 | ```
# Hegyi (1974) index (no distance offset, as usual)
summary(pairwise(finpines, maxR = 6, kernel=powers_ker))
``` |

```
Loading required package: spatstat
Loading required package: spatstat.data
Loading required package: nlme
Loading required package: rpart
spatstat 1.64-1 (nickname: ‘Help you I can, yes!’)
For an introduction to spatstat, type ‘beginner’
Note: spatstat version 1.64-1 is out of date by more than a year; we strongly recommend upgrading to the latest version.
Attaching package: ‘siplab’
The following object is masked from ‘package:spatstat’:
edges
Marked planar point pattern: 126 points
Average intensity 1.26 points per square metre
Coordinates are given to 13 decimal places
Mark variables: diameter, height, cindex
Summary:
diameter height cindex
Min. :0.000 Min. :0.800 Min. : 5.28
1st Qu.:1.000 1st Qu.:1.825 1st Qu.: 21.09
Median :2.000 Median :2.850 Median : 36.28
Mean :2.532 Mean :2.828 Mean : 57.95
3rd Qu.:3.000 3rd Qu.:3.600 3rd Qu.: 73.57
Max. :7.000 Max. :5.400 Max. :489.61
NA's :8
Window: rectangle = [-5, 5] x [-8, 2] metres
(10 x 10 metres)
Window area = 100 square metres
Unit of length: 1 metre
Warning message:
some mark values are NA in the point pattern object
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.