Skip to content
R Package providing the Adapted Pair Correlation Function
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
inst
man
src
tools
vignettes
.Rbuildignore
.drone.yml
.gitattributes
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md
TODO.md
apcf.Rproj
appveyor.yml
cleanup
configure
configure.ac
cran-comments.md

README.md

apcf: Adapted Pair Correlation Function

Travis-CI Build Status AppVeyor Build Status Drone.io Status Package-License CRAN DOI

The Adapted Pair Correlation Function transfers the concept of the Pair Correlation Function from point patterns to patterns of patches of finite size and irregular shape (eg. lakes within a country). The main tasks are (i) the construction of nullmodels by rondomizing the patches of the original pattern within the study area, (ii) the edge correction by determining the proportion of a buffer within the study area, and (iii) the calculation of the shortest distances between the patches.

This is a reimplementation of the Adapted Pair Correlation Function (Nuske et al. 2009) in C++ using the libraries GEOS and GDAL directly instead of through PostGIS.

Requirements

For Unix-alikes GDAL (>= 2.0.0) and GEOS (>= 3.4.0) are required.

On Ubuntu bionic (18.04) and beyond one can install the dependencies simply with sudo apt install libgdal-dev libgeos-dev. In earlier Ubuntu version either add ubuntugis-unstable to the sources.list and use above command or compile dependencies from source.

Installation

The stable version can be installed from CRAN

install.packages("apcf")

and the development is available from Github using the package remotes (formerly devtools)

if(!require("remotes")) install.packages("remotes")
remotes::install_github("rnuske/apcf")

Usage

# calculate distances between patches of original pattern and 3 nullmodels
# number of nullmodels should by at least 199 and better yet 999
ds <- pat2dists(area=system.file("shapes/sim_area.shp", package="apcf"),
                pattern=system.file("shapes/sim_pat_reg.shp", package="apcf"),
                max_dist=25, n_sim=3)

# derive PCF and envelope from distances
pcf <- dists2pcf(ds, r=0.2, r_max=25, stoyan=0.15, n_rank=1)

# plot PCF
plot(x=pcf, xlim=c(0, 20), ylim=c(0, 2.2))

Links

References

Nuske, R.S., Sprauer, S. and Saborowski J. (2009): Adapting the pair-correlation function for analysing the spatial distribution of canopy gaps. Forest Ecology and Management 259(1): 107–116. DOI: 10.1016/j.foreco.2009.09.050

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.