prepare_data: Prior data preparation
Description
A simple function to prepare data before the NKDE calculation.
Usage
prepare_data(samples, lines, events, w, digits, tol, agg)
Arguments
samples
A spatialPointsDataFrame of the samples points
lines
A SpatialLinesDataFrame representing the network
events
A spatialPointsDataFrame of the events points
w
A numeric vector representing the weight of the events
digits
The number of digits to keep
tol
A float indicating the spatial tolerance when snapping events on
lines
agg
A double indicating if the points must be aggregated within a distance.
if NULL, then the points are aggregated by rounding the coordinates.
Value
the data prepared for the rest of the operations
Examples
Run this code# NOT RUN {
#This is an internal function, no example provided
# }
Run the code above in your browser using DataLab