Description Usage Arguments Details Value Author(s) References See Also Examples
Analyzing point clustering with Ripley's K function
1 2 3 4 5 6 7 8 9 10 | ripley(loc_df, loc_id, loc_lat, loc_lon,
area, t.max, t.sep = 10, K.local = FALSE,
ci.boot = FALSE, ci.alpha = 0.05, ciboot.samples = 100,
progmsg = FALSE, K.plot = TRUE, Kplot.func = "K",
plot.title = "Ripley's K", plotX = "t",
plotY = paste(Kplot.func, "Observed vs. expected"),
lcol.exp = "blue", lcol.emp = "red", lsize.exp = 1,
ltype.exp = "solid", lsize.emp = 1, ltype.emp = "solid",
bg.col = "gray95", bgrid = TRUE, bgrid.col = "white",
bgrid.size = 2, bgrid.type = "solid")
|
loc_df |
A data frame containing the points |
loc_id |
Column containing the IDs of the points in the data frame |
loc_lat |
Column containing the latitudes of the points in the data frame |
loc_lon |
Column containing the longitudes of the points in the data frame |
area |
Total area of the regarded region |
t.max |
Maximum distance |
t.sep |
Number of distance intervals |
K.local |
Logical arguments that indicates whether local K values are computed or not |
ci.boot |
Logical arguments that indicates whether bootstrap confidence intervals are computed or not |
ci.alpha |
Significance level of the bootstrap confidence intervals |
ciboot.samples |
No. of bootstrap samples |
progmsg |
Logical argument: Printing progress messages or not |
K.plot |
Logical argument: Plot K function or not |
Kplot.func |
Which function has to be plotted? K function ( |
plot.title |
If |
plotX |
If |
plotY |
If |
lcol.exp |
If |
lcol.emp |
If |
lsize.exp |
If |
lsize.emp |
If |
ltype.exp |
If |
ltype.emp |
If |
bg.col |
if |
bgrid |
if |
bgrid.col |
if |
bgrid.size |
if |
bgrid.type |
if |
Calculating and plotting of the K function and its derivations (L function, H function) and, optionally, bootstrap confidence intervals.
The function returns a list
containing:
K |
A |
K_local |
A |
local_ci |
A |
Thomas Wieland
Kiskowski, M.A./Hancock, J. F./Kenworthy, A. (2009): “On the Use of Ripley's K-function and its Derivatives to Analyze Domain Size”. In: Biophysical Journal, 97, 4, p. 1095-1103.
Krider, R. E./Putler, R. S. (2013): “Which Birds of a Feather Flock Together? Clustering and Avoidance Patterns of Similar Retail Outlets”. In: Geographical Analysis, 45, 2, p. 123-149.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
data(GoettingenHealth1)
# general practitioners, psychotherapists and pharmacies
area_goe <- 1753000000
# area of Landkreis Goettingen (sqm)
area_nom <- 1267000000
# area of Landkreis Northeim (sqm)
area_gn <- area_goe+area_nom
sqrt(area_gn/pi)
# this takes some seconds
ripley(GoettingenHealth1[GoettingenHealth1$type == "phys_gen",],
"location", "lat", "lon", area = area_gn, t.max = 30000, t.sep = 300)
ripley(GoettingenHealth1[GoettingenHealth1$type == "pharm",],
"location", "lat", "lon", area = area_gn, t.max = 30000, t.sep = 300)
ripley(GoettingenHealth1[GoettingenHealth1$type == "psych",],
"location", "lat", "lon", area = area_gn, t.max = 30000, t.sep = 300)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.