density_plot_nn: Determine the rule-distance

Description Usage Arguments Author(s) Examples

View source: R/find_rule_distance.R

Description

This function helps finding the rule-distance. It produces a SpatialPointsDataframe, calculates the nearest neighbour distance and plots a density curve for the to determine the rule-distance.

Usage

1
2
density_plot_nn(project_CRS, sites_table, xy, threshold = 10000,
  bin_width = 250, x_axis_steps = 1000)

Arguments

project_CRS

Coordinate Reference System of Project. Unit has to be metres.

sites_table

Dataframe or tibble containing individual sites in each row with two separate columns containing the coordinates

xy

Dataframe or tibble containing the coordinates in two separate columns

threshold

Threshold for nearest neighbour in metres. Default is 10000

bin_width

Bin width for density plot. Default is 250

x_axis_steps

Steps on x-axis in metres. Default is 500

Author(s)

David N. Matzig

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# provide CRS and data
project_CRS <- "+init=epsg:32634"
sites_table <- bronze_age_fortifications
xy <- sites_table[,c("xUTM","yUTM")]
 
# create density plot
density_plot_nn(project_CRS, sites_table, xy)

# save rule-distance in variable 'rule_distance_value_m'
rule_distance_value_m <- 2500 

ISAAKiel/lecAAR documentation built on Oct. 30, 2019, 7:16 p.m.